Commit 9b2355bd authored by VanillaSalt's avatar VanillaSalt

fix

parent fa61b949
......@@ -2154,7 +2154,6 @@ int32 field::special_summon_step(uint16 step, group * targets, card * target) {
pduel->write_buffer8(target->current.location);
pduel->write_buffer8(target->current.sequence);
pduel->write_buffer8(target->current.position);
target->set_status(STATUS_SUMMONING, TRUE);
return FALSE;
}
case 3: {
......@@ -2184,7 +2183,6 @@ int32 field::special_summon(uint16 step, effect * reason_effect, uint8 reason_pl
return TRUE;
}
for(auto cit = targets->container.begin(); cit != targets->container.end(); ++cit) {
(*cit)->set_status(STATUS_SUMMONING, FALSE);
(*cit)->set_status(STATUS_SUMMON_TURN, TRUE);
if((*cit)->is_position(POS_FACEUP))
(*cit)->enable_field_effect(TRUE);
......
......@@ -5,27 +5,46 @@ function c47594939.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable spsummon
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetTarget(c47594939.splimit)
e2:SetOperation(c47594939.adjustop)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetTarget(c47594939.splimit)
c:RegisterEffect(e3)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
e3:SetLabelObject(g)
end
function c47594939.lvfilter(c,lv)
return c:IsFaceup() and c:GetLevel()==lv and not c:IsStatus(STATUS_SUMMONING)
function c47594939.lvfilter(c,lv,tp)
return c:GetLevel()==lv and c:IsControler(tp)
end
function c47594939.rkfilter(c,rk)
return c:IsFaceup() and c:GetRank()==rk and not c:IsStatus(STATUS_SUMMONING)
function c47594939.rkfilter(c,rk,tp)
return c:GetRank()==rk and c:IsControler(tp)
end
function c47594939.splimit(e,c,sump,sumtype,sumpos,targetp)
local lv=c:GetLevel()
local rk=c:GetRank()
if lv>0 then
return Duel.IsExistingMatchingCard(c47594939.lvfilter,sump,LOCATION_MZONE,0,1,nil,lv)
return e:GetLabelObject():IsExists(c47594939.lvfilter,1,nil,lv,sump)
end
return Duel.IsExistingMatchingCard(c47594939.rkfilter,sump,LOCATION_MZONE,0,1,nil,rk)
return e:GetLabelObject():IsExists(c47594939.rkfilter,1,nil,rk,sump)
end
function c47594939.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
e:GetLabelObject():Clear()
e:GetLabelObject():Merge(g)
end
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