Commit b1f143d7 authored by mercury233's avatar mercury233
parents 3ee2dd48 a1a33d15
...@@ -3358,6 +3358,8 @@ int32 field::check_trigger_effect(const chain& ch) const { ...@@ -3358,6 +3358,8 @@ int32 field::check_trigger_effect(const chain& ch) const {
return FALSE; return FALSE;
if(peffect->code == EVENT_FLIP && infos.phase == PHASE_DAMAGE) if(peffect->code == EVENT_FLIP && infos.phase == PHASE_DAMAGE)
return TRUE; return TRUE;
if((phandler->current.location & LOCATION_DECK) && !(ch.flag & CHAIN_DECK_EFFECT))
return FALSE;
if((ch.triggering_location & (LOCATION_DECK | LOCATION_HAND | LOCATION_EXTRA)) if((ch.triggering_location & (LOCATION_DECK | LOCATION_HAND | LOCATION_EXTRA))
&& (ch.triggering_position & POS_FACEDOWN)) && (ch.triggering_position & POS_FACEDOWN))
return TRUE; return TRUE;
......
...@@ -253,7 +253,6 @@ static const struct luaL_Reg cardlib[] = { ...@@ -253,7 +253,6 @@ static const struct luaL_Reg cardlib[] = {
{ "IsCanBeEffectTarget", scriptlib::card_is_can_be_effect_target }, { "IsCanBeEffectTarget", scriptlib::card_is_can_be_effect_target },
{ "IsCanBeBattleTarget", scriptlib::card_is_can_be_battle_target }, { "IsCanBeBattleTarget", scriptlib::card_is_can_be_battle_target },
{ "AddMonsterAttribute", scriptlib::card_add_monster_attribute }, { "AddMonsterAttribute", scriptlib::card_add_monster_attribute },
{ "AddMonsterAttributeComplete", scriptlib::card_add_monster_attribute_complete },
{ "CancelToGrave", scriptlib::card_cancel_to_grave }, { "CancelToGrave", scriptlib::card_cancel_to_grave },
{ "GetTributeRequirement", scriptlib::card_get_tribute_requirement }, { "GetTributeRequirement", scriptlib::card_get_tribute_requirement },
{ "GetBattleTarget", scriptlib::card_get_battle_target }, { "GetBattleTarget", scriptlib::card_get_battle_target },
......
...@@ -2893,9 +2893,6 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) { ...@@ -2893,9 +2893,6 @@ int32 scriptlib::card_add_monster_attribute(lua_State *L) {
} }
return 0; return 0;
} }
int32 scriptlib::card_add_monster_attribute_complete(lua_State *L) {
return 0;
}
int32 scriptlib::card_cancel_to_grave(lua_State *L) { int32 scriptlib::card_cancel_to_grave(lua_State *L) {
check_param_count(L, 1); check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1); check_param(L, PARAM_TYPE_CARD, 1);
......
...@@ -4440,8 +4440,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret, ...@@ -4440,8 +4440,7 @@ int32 field::move_to_field(uint16 step, card* target, uint32 enable, uint32 ret,
peffect->dec_count(); peffect->dec_count();
} }
} }
effect* teffect; if(effect* teffect = target->is_affected_by_effect(EFFECT_PRE_MONSTER)) {
if(teffect = target->is_affected_by_effect(EFFECT_PRE_MONSTER)) {
uint32 type = teffect->value; uint32 type = teffect->value;
if(type & TYPE_TRAP) if(type & TYPE_TRAP)
type |= TYPE_TRAPMONSTER | target->data.type; type |= TYPE_TRAPMONSTER | target->data.type;
......
...@@ -257,7 +257,6 @@ public: ...@@ -257,7 +257,6 @@ public:
static int32 card_is_can_be_effect_target(lua_State *L); static int32 card_is_can_be_effect_target(lua_State *L);
static int32 card_is_can_be_battle_target(lua_State *L); static int32 card_is_can_be_battle_target(lua_State *L);
static int32 card_add_monster_attribute(lua_State *L); static int32 card_add_monster_attribute(lua_State *L);
static int32 card_add_monster_attribute_complete(lua_State *L);
static int32 card_cancel_to_grave(lua_State *L); static int32 card_cancel_to_grave(lua_State *L);
static int32 card_get_tribute_requirement(lua_State *L); static int32 card_get_tribute_requirement(lua_State *L);
static int32 card_get_battle_target(lua_State *L); static int32 card_get_battle_target(lua_State *L);
......
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