Commit c07c2961 authored by salix5's avatar salix5
parent 1c9b1071
...@@ -1423,7 +1423,7 @@ void field::adjust_self_destroy_set() { ...@@ -1423,7 +1423,7 @@ void field::adjust_self_destroy_set() {
for(auto cit = cset.begin(); cit != cset.end(); ++cit) { for(auto cit = cset.begin(); cit != cset.end(); ++cit) {
card* pcard = *cit; card* pcard = *cit;
if((!pcard->get_status(STATUS_DISABLED | STATUS_FORBIDDEN) && (peffect = check_unique_onfield(pcard, pcard->current.controler, pcard->current.location))) if((!pcard->get_status(STATUS_DISABLED | STATUS_FORBIDDEN) && (peffect = check_unique_onfield(pcard, pcard->current.controler, pcard->current.location)))
|| (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY))) { || (peffect = pcard->is_affected_by_effect(EFFECT_SELF_DESTROY)) && !pcard->is_status(STATUS_BATTLE_DESTROYED)) {
core.self_destroy_set.insert(pcard); core.self_destroy_set.insert(pcard);
pcard->temp.reason_effect = pcard->current.reason_effect; pcard->temp.reason_effect = pcard->current.reason_effect;
pcard->temp.reason_player = pcard->current.reason_player; pcard->temp.reason_player = pcard->current.reason_player;
......
...@@ -182,6 +182,7 @@ void field::special_summon_complete(effect* reason_effect, uint8 reason_player) ...@@ -182,6 +182,7 @@ void field::special_summon_complete(effect* reason_effect, uint8 reason_player)
//core.special_summoning.clear(); //core.special_summoning.clear();
add_process(PROCESSOR_SPSUMMON_COMP_S, 0, reason_effect, ng, reason_player, 0); add_process(PROCESSOR_SPSUMMON_COMP_S, 0, reason_effect, ng, reason_player, 0);
} }
// destroy: 1st arg is card or card_set=>card version, otherwise=>step version
// destroy in script: here->PROCESSOR_DESTROY, step 0 // destroy in script: here->PROCESSOR_DESTROY, step 0
// set current.reason // set current.reason
void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) { void field::destroy(card_set* targets, effect* reason_effect, uint32 reason, uint32 reason_player, uint32 playerid, uint32 destination, uint32 sequence) {
...@@ -2667,6 +2668,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl ...@@ -2667,6 +2668,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
} }
return TRUE; return TRUE;
} }
// destroy: step version
// PROCESSOR_DESTROY_STEP goes here // PROCESSOR_DESTROY_STEP goes here
int32 field::destroy(uint16 step, group * targets, card * target, uint8 battle) { int32 field::destroy(uint16 step, group * targets, card * target, uint8 battle) {
if(target->current.location & (LOCATION_GRAVE | LOCATION_REMOVED)) { if(target->current.location & (LOCATION_GRAVE | LOCATION_REMOVED)) {
......
...@@ -3458,7 +3458,6 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3458,7 +3458,6 @@ int32 field::process_battle_command(uint16 step) {
return FALSE; return FALSE;
} }
case 29: { case 29: {
core.selfdes_disabled = FALSE;
if(core.battle_destroy_rep.size()) if(core.battle_destroy_rep.size())
destroy(&core.battle_destroy_rep, 0, REASON_EFFECT | REASON_REPLACE, PLAYER_NONE); destroy(&core.battle_destroy_rep, 0, REASON_EFFECT | REASON_REPLACE, PLAYER_NONE);
if(core.desrep_chain.size()) if(core.desrep_chain.size())
...@@ -3474,6 +3473,7 @@ int32 field::process_battle_command(uint16 step) { ...@@ -3474,6 +3473,7 @@ int32 field::process_battle_command(uint16 step) {
(*cit)->filter_disable_related_cards(); (*cit)->filter_disable_related_cards();
} }
} }
core.selfdes_disabled = FALSE;
adjust_all(); adjust_all();
//EVENT_BATTLE_END was here, but this timing does not exist in Master Rule 3 //EVENT_BATTLE_END was here, but this timing does not exist in Master Rule 3
return FALSE; return FALSE;
......
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