Commit a0263cec authored by VanillaSalt's avatar VanillaSalt

fix

parent 5519b682
...@@ -1039,16 +1039,16 @@ int32 field::self_destroy(uint16 step) { ...@@ -1039,16 +1039,16 @@ int32 field::self_destroy(uint16 step) {
} }
case 1: { case 1: {
if(!(core.global_flag & GLOBALFLAG_SELF_TOGRAVE)) if(!(core.global_flag & GLOBALFLAG_SELF_TOGRAVE))
return FALSE; return TRUE;
core.units.begin()->arg1 = returns.ivalue[0]; core.units.begin()->arg1 = returns.ivalue[0];
if(!core.self_tograve_set.empty()) if(!core.self_tograve_set.empty())
send_to(&core.self_tograve_set, 0, REASON_EFFECT, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP); send_to(&core.self_tograve_set, 0, REASON_EFFECT, PLAYER_NONE, PLAYER_NONE, LOCATION_GRAVE, 0, POS_FACEUP);
else
return TRUE;
return FALSE; return FALSE;
} }
case 2: { case 2: {
returns.ivalue[0] += core.units.begin()->arg1; returns.ivalue[0] += core.units.begin()->arg1;
if(returns.ivalue[0])
adjust_instant();
return TRUE; return TRUE;
} }
} }
......
...@@ -3360,11 +3360,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3360,11 +3360,7 @@ int32 field::process_battle_command(uint16 step) {
case 21: { case 21: {
if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0]
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
core.units.begin()->arg1 = 0; core.units.begin()->step = 37;
core.damage_calculated = TRUE;
core.selfdes_disabled = FALSE;
core.flip_delayed = FALSE;
core.units.begin()->step = 38;
return FALSE; return FALSE;
} }
if(!core.attack_target) { if(!core.attack_target) {
...@@ -3421,11 +3417,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3421,11 +3417,7 @@ int32 field::process_battle_command(uint16 step) {
if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0]
|| ((core.attacker->current.position & POS_DEFENCE) && !(core.attacker->is_affected_by_effect(EFFECT_DEFENCE_ATTACK))) || ((core.attacker->current.position & POS_DEFENCE) && !(core.attacker->is_affected_by_effect(EFFECT_DEFENCE_ATTACK)))
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
core.units.begin()->arg1 = 0; core.units.begin()->step = 37;
core.damage_calculated = TRUE;
core.selfdes_disabled = FALSE;
core.flip_delayed = FALSE;
core.units.begin()->step = 38;
return FALSE; return FALSE;
} }
return FALSE; return FALSE;
...@@ -3454,11 +3446,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3454,11 +3446,7 @@ int32 field::process_battle_command(uint16 step) {
case 25: { case 25: {
if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0] if(core.attacker->current.location != LOCATION_MZONE || core.attacker->fieldid_r != core.pre_field[0]
|| (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) { || (core.attack_target && (core.attack_target->current.location != LOCATION_MZONE || core.attack_target->fieldid_r != core.pre_field[1]))) {
core.units.begin()->arg1 = 0; core.units.begin()->step = 37;
core.damage_calculated = TRUE;
core.selfdes_disabled = FALSE;
core.flip_delayed = FALSE;
core.units.begin()->step = 38;
return FALSE; return FALSE;
} }
raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0); raise_single_event(core.attacker, 0, EVENT_DAMAGE_CALCULATING, 0, 0, 0, 0, 0);
...@@ -3753,6 +3741,17 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3753,6 +3741,17 @@ int32 field::process_battle_command(uint16 step) {
core.units.begin()->step = 38; core.units.begin()->step = 38;
return FALSE; return FALSE;
} }
case 38: {
core.units.begin()->arg1 = 0;
core.damage_calculated = TRUE;
core.selfdes_disabled = FALSE;
core.flip_delayed = FALSE;
core.new_fchain.splice(core.new_fchain.begin(), core.new_fchain_b);
core.new_ochain.splice(core.new_ochain.begin(), core.new_ochain_b);
if(core.new_fchain.size() || core.new_ochain.size())
add_process(PROCESSOR_POINT_EVENT, 0, 0, 0, 0, 0);
return FALSE;
}
case 39: { case 39: {
//end of damage step //end of damage step
core.units.begin()->step = -1; core.units.begin()->step = -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment