Commit 713fa284 authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:Fluorohydride/ygopro-core

parents 9895a5da aba66bc2
...@@ -3751,7 +3751,7 @@ int32 card::is_capable_be_battle_target(card* pcard) { ...@@ -3751,7 +3751,7 @@ int32 card::is_capable_be_battle_target(card* pcard) {
return FALSE; return FALSE;
if(pcard->is_affected_by_effect(EFFECT_CANNOT_SELECT_BATTLE_TARGET, this)) if(pcard->is_affected_by_effect(EFFECT_CANNOT_SELECT_BATTLE_TARGET, this))
return FALSE; return FALSE;
if(is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) if(is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET, pcard))
return FALSE; return FALSE;
return TRUE; return TRUE;
} }
......
...@@ -495,8 +495,9 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2) ...@@ -495,8 +495,9 @@ inline effect_flag operator|(effect_flag flag1, effect_flag flag2)
#define EVENT_CHAINING 1027 #define EVENT_CHAINING 1027
#define EVENT_BECOME_TARGET 1028 #define EVENT_BECOME_TARGET 1028
#define EVENT_DESTROYED 1029 #define EVENT_DESTROYED 1029
#define EVENT_MOVE 1030 #define EVENT_MOVE 1030
#define EVENT_ADJUST 1040 #define EVENT_ADJUST 1040
#define EVENT_BREAK_EFFECT 1050
#define EVENT_SUMMON_SUCCESS 1100 #define EVENT_SUMMON_SUCCESS 1100
#define EVENT_FLIP_SUMMON_SUCCESS 1101 #define EVENT_FLIP_SUMMON_SUCCESS 1101
#define EVENT_SPSUMMON_SUCCESS 1102 #define EVENT_SPSUMMON_SUCCESS 1102
......
...@@ -2369,7 +2369,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack, ...@@ -2369,7 +2369,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack,
continue; continue;
if(pcard->announced_cards.findcard(atarget) >= (uint32)peffect->get_value(atarget)) if(pcard->announced_cards.findcard(atarget) >= (uint32)peffect->get_value(atarget))
continue; continue;
if(atype >= 2 && atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) if(atype >= 2 && atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET, pcard))
continue; continue;
if(select_target && (atype == 2 || atype == 4)) { if(select_target && (atype == 2 || atype == 4)) {
if(atarget->is_affected_by_effect(EFFECT_CANNOT_BE_BATTLE_TARGET, pcard)) if(atarget->is_affected_by_effect(EFFECT_CANNOT_BE_BATTLE_TARGET, pcard))
...@@ -2387,7 +2387,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack, ...@@ -2387,7 +2387,7 @@ int32 field::get_attack_target(card* pcard, card_vector* v, uint8 chain_attack,
for(auto& atarget : *pv) { for(auto& atarget : *pv) {
if(!atarget) if(!atarget)
continue; continue;
if(atype >= 2 && atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET)) if(atype >= 2 && atarget->is_affected_by_effect(EFFECT_IGNORE_BATTLE_TARGET, pcard))
continue; continue;
mcount++; mcount++;
if(chain_attack && core.chain_attack_target && atarget != core.chain_attack_target) if(chain_attack && core.chain_attack_target && atarget != core.chain_attack_target)
......
...@@ -1938,6 +1938,8 @@ int32 scriptlib::duel_break_effect(lua_State *L) { ...@@ -1938,6 +1938,8 @@ int32 scriptlib::duel_break_effect(lua_State *L) {
check_action_permission(L); check_action_permission(L);
duel* pduel = interpreter::get_duel_info(L); duel* pduel = interpreter::get_duel_info(L);
pduel->game_field->break_effect(); pduel->game_field->break_effect();
pduel->game_field->raise_event((card*)0, EVENT_BREAK_EFFECT, 0, 0, PLAYER_NONE, PLAYER_NONE, 0);
pduel->game_field->process_instant_event();
return lua_yield(L, 0); return lua_yield(L, 0);
} }
int32 scriptlib::duel_change_effect(lua_State *L) { int32 scriptlib::duel_change_effect(lua_State *L) {
......
...@@ -1820,7 +1820,7 @@ int32 field::process_instant_event() { ...@@ -1820,7 +1820,7 @@ int32 field::process_instant_event() {
} }
} }
} }
if(ev.event_code == EVENT_ADJUST || ((ev.event_code & 0xf000) == EVENT_PHASE_START)) if(ev.event_code == EVENT_ADJUST || ev.event_code == EVENT_BREAK_EFFECT || ((ev.event_code & 0xf000) == EVENT_PHASE_START))
continue; continue;
//triggers //triggers
pr = effects.trigger_f_effect.equal_range(ev.event_code); pr = effects.trigger_f_effect.equal_range(ev.event_code);
......
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