Commit fa2c95f4 authored by wind2009's avatar wind2009

Merge remote-tracking branch 'upstream/master' into develop

parents efcf37aa 08078797
......@@ -1754,6 +1754,8 @@ int32_t card::add_effect(effect* peffect) {
return 0;
if (peffect->type & EFFECT_TYPES_TRIGGER_LIKE && is_continuous_event(peffect->code))
return 0;
if (peffect->type & EFFECT_TYPES_CHAIN_LINK && peffect->owner == pduel->game_field->temp_card)
return 0;
// the trigger effect in phase is "once per turn" by default
if (peffect->get_code_type() == CODE_PHASE && peffect->code & (PHASE_DRAW | PHASE_STANDBY | PHASE_END)
&& peffect->type & (EFFECT_TYPE_TRIGGER_O | EFFECT_TYPE_TRIGGER_F) && !peffect->is_flag(EFFECT_FLAG_COUNT_LIMIT)) {
......@@ -4093,19 +4095,6 @@ int32_t card::is_can_be_synchro_material(card* scard, card* tuner) {
for(effect_set::size_type i = 0; i < eset.size(); ++i)
if(eset[i]->get_value(scard))
return FALSE;
if(scard && !(current.location == LOCATION_MZONE && current.controler == scard->current.controler)) {
eset.clear();
filter_effect(EFFECT_EXTRA_SYNCHRO_MATERIAL, &eset);
if(eset.size()) {
for(effect_set::size_type i = 0; i < eset.size(); ++i) {
if(!eset[i]->check_count_limit(scard->current.controler))
continue;
if(eset[i]->get_value(scard))
return TRUE;
}
return FALSE;
}
}
return TRUE;
}
int32_t card::is_can_be_ritual_material(card* scard) {
......
......@@ -1164,6 +1164,8 @@ void field::add_effect(effect* peffect, uint8_t owner_player) {
return;
if (effects.indexer.find(peffect) != effects.indexer.end())
return;
if (peffect->type & EFFECT_TYPES_CHAIN_LINK && peffect->owner == temp_card)
return;
effect_container::iterator it;
if (!(peffect->type & EFFECT_TYPE_ACTIONS)) {
it = effects.aura_effect.emplace(peffect->code, peffect);
......
......@@ -24,7 +24,7 @@ int32_t field::negate_chain(uint8_t chaincount) {
pchain.flag |= CHAIN_DISABLE_ACTIVATE;
pchain.disable_reason = core.reason_effect;
pchain.disable_player = core.reason_player;
if((pchain.triggering_effect->type & EFFECT_TYPE_ACTIVATE) && (phandler->current.location == LOCATION_SZONE)) {
if((pchain.triggering_effect->type & EFFECT_TYPE_ACTIVATE) && phandler->is_has_relation(pchain) && (phandler->current.location == LOCATION_SZONE)) {
phandler->set_status(STATUS_LEAVE_CONFIRMED, TRUE);
phandler->set_status(STATUS_ACTIVATE_DISABLED, TRUE);
}
......
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