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