|
1
|
function scr_monsterdefeatscr_monsterdefeat
function scr_monsterdefeat()
{
if (global.monster[myself] == 1)
{
global.monstergold[3] += global.monstergold[myself];
global.monsterexp[3] += global.monsterexp[myself];
global.monster[myself] = 0;
if (global.flag[51 + myself] == 0)
{
global.flag[51 + myself] = 2;
if (global.monsterhp[myself] <= 0)
global.flag[51 + myself] = 1;
}
if (global.flag[51 + myself] == 1)
global.flag[40 violences] += 1;
if (global.flag[51 + myself] == 2)
global.flag[41 spares] += 1;
if (global.flag[51 + myself] == 3)
global.flag[42 pacifies] += 1;
if (global.flag[51 + myself] == 5)
global.flag[43 autosusie_violences] += 1;
if (scr_monsterpop() == 0)
{
_amt_add = 0;
_violenced = 0;
_spared = 0;
_pacified = 0;
for (d_i = 0; d_i < 3; d_i += 1)
{
if (global.flag[51 + d_i] != 0)
_amt_add += 1;
if (global.flag[51 + d_i] == 1)
_violenced += 1;
if (global.flag[51 + d_i] == 2)
_spared += 1;
if (global.flag[51 + d_i] == 3)
_pacified += 1;
}
if (_pacified > 0)
global.flag[50 last_encounter_end] = 3;
if (_spared > 0)
global.flag[50 last_encounter_end] = 2;
if (_violenced > 0)
global.flag[50 last_encounter_end] = 1;
}
event_user(11);
}
}
()
|
|
2
|
{
|
|
3
|
if (global.monster[myself] == 1)
|
|
4
|
{
|
|
5
|
global.monstergold[3] += global.monstergold[myself];
|
|
6
|
global.monsterexp[3] += global.monsterexp[myself];
|
|
7
|
global.monster[myself] = 0;
|
|
8
|
if (global.flag[51 + myself] == 0)
|
|
9
|
{
|
|
10
|
global.flag[51 + myself] = 2;
|
|
11
|
if (global.monsterhp[myself] <= 0)
|
|
12
|
global.flag[51 + myself] = 1;
|
|
13
|
}
|
|
14
|
if (global.flag[51 + myself] == 1)
|
|
15
|
global.flag[40 violences] += 1;
|
|
16
|
if (global.flag[51 + myself] == 2)
|
|
17
|
global.flag[41 spares] += 1;
|
|
18
|
if (global.flag[51 + myself] == 3)
|
|
19
|
global.flag[42 pacifies] += 1;
|
|
20
|
if (global.flag[51 + myself] == 5)
|
|
21
|
global.flag[43 autosusie_violences] += 1;
|
|
22
|
if (scr_monsterpopscr_monsterpop
function scr_monsterpop()
{
return global.monster[0] + global.monster[1] + global.monster[2];
}
() == 0)
|
|
23
|
{
|
|
24
|
_amt_add = 0;
|
|
25
|
_violenced = 0;
|
|
26
|
_spared = 0;
|
|
27
|
_pacified = 0;
|
|
28
|
for (d_i = 0; d_i < 3; d_i += 1)
|
|
29
|
{
|
|
30
|
if (global.flag[51 + d_i] != 0)
|
|
31
|
_amt_add += 1;
|
|
32
|
if (global.flag[51 + d_i] == 1)
|
|
33
|
_violenced += 1;
|
|
34
|
if (global.flag[51 + d_i] == 2)
|
|
35
|
_spared += 1;
|
|
36
|
if (global.flag[51 + d_i] == 3)
|
|
37
|
_pacified += 1;
|
|
38
|
}
|
|
39
|
if (_pacified > 0)
|
|
40
|
global.flag[50 last_encounter_end] = 3;
|
|
41
|
if (_spared > 0)
|
|
42
|
global.flag[50 last_encounter_end] = 2;
|
|
43
|
if (_violenced > 0)
|
|
44
|
global.flag[50 last_encounter_end] = 1;
|
|
45
|
}
|
|
46
|
event_user(11);
|
|
47
|
}
|
|
48
|
}
|