Commit 403008f7 authored by salix5's avatar salix5

STATUS_SPSUMMON_STEP

parent be8d2f6b
...@@ -380,7 +380,7 @@ public: ...@@ -380,7 +380,7 @@ public:
#define STATUS_SET_TURN 0x0010 // #define STATUS_SET_TURN 0x0010 //
#define STATUS_NO_LEVEL 0x0020 // #define STATUS_NO_LEVEL 0x0020 //
#define STATUS_REVIVE_LIMIT 0x0040 // #define STATUS_REVIVE_LIMIT 0x0040 //
#define STATUS_ATTACKED 0x0080 // #define STATUS_SPSUMMON_STEP 0x0080 //
#define STATUS_FORM_CHANGED 0x0100 // #define STATUS_FORM_CHANGED 0x0100 //
#define STATUS_SUMMONING 0x0200 // #define STATUS_SUMMONING 0x0200 //
#define STATUS_EFFECT_ENABLED 0x0400 // #define STATUS_EFFECT_ENABLED 0x0400 //
......
...@@ -934,8 +934,9 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui ...@@ -934,8 +934,9 @@ int32 field::filter_matching_card(int32 findex, uint8 self, uint32 location1, ui
if(location & LOCATION_MZONE) { if(location & LOCATION_MZONE) {
for(uint32 i = 0; i < 5; ++i) { for(uint32 i = 0; i < 5; ++i) {
pcard = player[self].list_mzone[i]; pcard = player[self].list_mzone[i];
if(pcard && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED) && pcard != pexception if(pcard && !pcard->is_status(STATUS_SUMMONING) && !pcard->is_status(STATUS_SUMMON_DISABLED) && !pcard->is_status(STATUS_SPSUMMON_STEP)
&& pduel->lua->check_matching(pcard, findex, extraargs) && (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) { && pcard != pexception && pduel->lua->check_matching(pcard, findex, extraargs)
&& (!is_target || pcard->is_capable_be_effect_target(core.reason_effect, core.reason_player))) {
if(pret) { if(pret) {
*pret = pcard; *pret = pcard;
return TRUE; return TRUE;
......
...@@ -2454,6 +2454,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) { ...@@ -2454,6 +2454,7 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
returns.ivalue[0] = TRUE; returns.ivalue[0] = TRUE;
if(target->owner != target->current.controler) if(target->owner != target->current.controler)
set_control(target, target->current.controler, 0, 0); set_control(target, target->current.controler, 0, 0);
target->set_status(STATUS_SPSUMMON_STEP, TRUE);
return TRUE; return TRUE;
} }
} }
...@@ -2512,6 +2513,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl ...@@ -2512,6 +2513,7 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
for(auto cit = spsummon_once_set[1].begin(); cit != spsummon_once_set[1].end(); ++cit) for(auto cit = spsummon_once_set[1].begin(); cit != spsummon_once_set[1].end(); ++cit)
core.spsummon_once_map[1][*cit]++; core.spsummon_once_map[1][*cit]++;
for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) { for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) {
(*cit)->set_status(STATUS_SPSUMMON_STEP, FALSE);
(*cit)->set_status(STATUS_SUMMON_TURN, TRUE); (*cit)->set_status(STATUS_SUMMON_TURN, TRUE);
if((*cit)->is_position(POS_FACEUP)) if((*cit)->is_position(POS_FACEUP))
(*cit)->enable_field_effect(TRUE); (*cit)->enable_field_effect(TRUE);
...@@ -3616,7 +3618,6 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret ...@@ -3616,7 +3618,6 @@ int32 field::move_to_field(uint16 step, card * target, uint32 enable, uint32 ret
target->set_status(STATUS_FLIP_SUMMON_TURN, FALSE); target->set_status(STATUS_FLIP_SUMMON_TURN, FALSE);
target->set_status(STATUS_SET_TURN, FALSE); target->set_status(STATUS_SET_TURN, FALSE);
target->set_status(STATUS_FORM_CHANGED, FALSE); target->set_status(STATUS_FORM_CHANGED, FALSE);
target->set_status(STATUS_ATTACKED, FALSE);
} }
} }
target->temp.sequence = seq; target->temp.sequence = seq;
......
...@@ -4015,7 +4015,6 @@ int32 field::process_turn(uint16 step, uint8 turn_player) { ...@@ -4015,7 +4015,6 @@ int32 field::process_turn(uint16 step, uint8 turn_player) {
pcard->set_status(STATUS_FLIP_SUMMON_TURN, FALSE); pcard->set_status(STATUS_FLIP_SUMMON_TURN, FALSE);
pcard->set_status(STATUS_SET_TURN, FALSE); pcard->set_status(STATUS_SET_TURN, FALSE);
pcard->set_status(STATUS_FORM_CHANGED, FALSE); pcard->set_status(STATUS_FORM_CHANGED, FALSE);
pcard->set_status(STATUS_ATTACKED, FALSE);
pcard->announce_count = 0; pcard->announce_count = 0;
pcard->attacked_count = 0; pcard->attacked_count = 0;
pcard->announced_cards.clear(); pcard->announced_cards.clear();
......
...@@ -13,28 +13,12 @@ function c31615285.initial_effect(c) ...@@ -13,28 +13,12 @@ function c31615285.initial_effect(c)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1) e2:SetTargetRange(1,1)
e2:SetCondition(c31615285.discon) e2:SetCondition(c31615285.dscon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--adjust
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_MZONE)
e3:SetOperation(c31615285.adjustop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c31615285.discon(e)
return e:GetLabel()~=0
end end
function c31615285.filter(c) function c31615285.filter(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c31615285.adjustop(e,tp,eg,ep,ev,re,r,rp) function c31615285.dscon(e)
local phase=Duel.GetCurrentPhase() return Duel.IsExistingMatchingCard(c31615285.filter,0,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler())
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
if Duel.IsExistingMatchingCard(c31615285.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) then
e:GetLabelObject():SetLabel(1)
else e:GetLabelObject():SetLabel(0) end
end end
...@@ -131,7 +131,7 @@ STATUS_PROC_COMPLETE =0x0008 --完成正规召唤(解除苏生限制) ...@@ -131,7 +131,7 @@ STATUS_PROC_COMPLETE =0x0008 --完成正规召唤(解除苏生限制)
STATUS_SET_TURN =0x0010 --覆盖 STATUS_SET_TURN =0x0010 --覆盖
STATUS_NO_LEVEL =0x0020 --无等级 STATUS_NO_LEVEL =0x0020 --无等级
STATUS_REVIVE_LIMIT =0x0040 --未解除苏生限制 STATUS_REVIVE_LIMIT =0x0040 --未解除苏生限制
STATUS_ATTACKED =0x0080 --攻击过 STATUS_SPSUMMON_STEP =0x0080 --效果特召處理中
STATUS_FORM_CHANGED =0x0100 --改变过表示形式 STATUS_FORM_CHANGED =0x0100 --改变过表示形式
STATUS_SUMMONING =0x0200 --召唤中 STATUS_SUMMONING =0x0200 --召唤中
STATUS_EFFECT_ENABLED =0x0400 --效果有效 STATUS_EFFECT_ENABLED =0x0400 --效果有效
...@@ -141,7 +141,7 @@ STATUS_LEAVE_CONFIRMED =0x2000 --連鎖處理完後送去墓地的魔法陷阱 ...@@ -141,7 +141,7 @@ STATUS_LEAVE_CONFIRMED =0x2000 --連鎖處理完後送去墓地的魔法陷阱
STATUS_BATTLE_DESTROYED =0x4000 --战斗破坏确定 STATUS_BATTLE_DESTROYED =0x4000 --战斗破坏确定
STATUS_COPYING_EFFECT =0x8000 --复制效果 STATUS_COPYING_EFFECT =0x8000 --复制效果
STATUS_CHAINING =0x10000 --正在連鎖串中 STATUS_CHAINING =0x10000 --正在連鎖串中
STATUS_SUMMON_DISABLED =0x20000 --召唤无效 STATUS_SUMMON_DISABLED =0x20000 --召唤无效後尚未移動
STATUS_ACTIVATE_DISABLED =0x40000 --发动无效 STATUS_ACTIVATE_DISABLED =0x40000 --发动无效
STATUS_UNSUMMONABLE_CARD =0x80000 --不能通常召唤 STATUS_UNSUMMONABLE_CARD =0x80000 --不能通常召唤
STATUS_UNION =0x100000 --同盟 STATUS_UNION =0x100000 --同盟
......
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