Commit 8e85f2bb authored by VanillaSalt's avatar VanillaSalt

fix

parent c9262d27
...@@ -6,7 +6,7 @@ function c32623004.initial_effect(c) ...@@ -6,7 +6,7 @@ function c32623004.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_F)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL+EFFECT_FLAG_CHAIN_UNIQUE)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c32623004.spcon) e1:SetCondition(c32623004.spcon)
e1:SetCost(c32623004.spcost) e1:SetCost(c32623004.spcost)
...@@ -18,7 +18,7 @@ function c32623004.initial_effect(c) ...@@ -18,7 +18,7 @@ function c32623004.initial_effect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_TO_HAND_REDIRECT) e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD) e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c32623004.rmtg) e2:SetTarget(c32623004.rmtg)
e2:SetValue(LOCATION_REMOVED) e2:SetValue(LOCATION_REMOVED)
...@@ -28,11 +28,7 @@ function c32623004.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -28,11 +28,7 @@ function c32623004.spcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsSetCard(0x5a) return re:GetHandler():IsSetCard(0x5a)
end end
function c32623004.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c32623004.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then return Duel.GetFlagEffect(tp,32623004)==0 end
if Duel.GetFlagEffect(tp,32623005)~=0 then return false end
Duel.RegisterFlagEffect(tp,32623005,RESET_CHAIN,0,1)
return Duel.GetFlagEffect(tp,32623004)==0
end
Duel.RegisterFlagEffect(tp,32623004,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,32623004,RESET_PHASE+PHASE_END,0,1)
end end
function c32623004.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c32623004.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -45,5 +41,6 @@ function c32623004.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,5 +41,6 @@ function c32623004.spop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c32623004.rmtg(e,c) function c32623004.rmtg(e,c)
return c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x5a) return c:GetDestination()==LOCATION_HAND
and c:IsReason(REASON_EFFECT) and c:GetReasonEffect():GetHandler():IsSetCard(0x5a)
end end
...@@ -16,10 +16,10 @@ function c47594939.initial_effect(c) ...@@ -16,10 +16,10 @@ function c47594939.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c47594939.lvfilter(c,lv) function c47594939.lvfilter(c,lv)
return c:GetLevel()==lv return c:IsFaceup() and c:GetLevel()==lv and not c:IsStatus(STATUS_SUMMONING)
end end
function c47594939.rkfilter(c,rk) function c47594939.rkfilter(c,rk)
return c:GetRank()==rk return c:IsFaceup() and c:GetRank()==rk and not c:IsStatus(STATUS_SUMMONING)
end end
function c47594939.splimit(e,c,sump,sumtype,sumpos,targetp) function c47594939.splimit(e,c,sump,sumtype,sumpos,targetp)
local lv=c:GetLevel() local lv=c:GetLevel()
......
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c61318483.spop(e,tp,eg,ep,ev,re,r,rp) function c61318483.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local at=Duel.GetAttacker() local at=Duel.GetAttacker()
if at:IsControler(1-tp) and at:IsFaceup() and Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)>0 then if at:IsControler(1-tp) and at:IsRelateToBattle() and at:IsFaceup() and Duel.ChangePosition(at,POS_FACEDOWN_DEFENCE)>0 then
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)>0 then
Duel.ConfirmCards(1-tp,c) Duel.ConfirmCards(1-tp,c)
end end
......
...@@ -89,6 +89,17 @@ function c68396121.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -89,6 +89,17 @@ function c68396121.atkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK) e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END) e2:SetReset(RESET_EVENT+0x1ff0000+RESET_PHASE+RESET_END)
e2:SetCondition(c68396121.dircon)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetCondition(c68396121.dircon2)
c:RegisterEffect(e3)
end end
end end
function c68396121.dircon(e)
return e:GetHandler():GetAttackAnnouncedCount()>0
end
function c68396121.dircon2(e)
return e:GetHandler():IsDirectAttacked()
end
...@@ -51,10 +51,11 @@ function c71921856.atkval(e,c) ...@@ -51,10 +51,11 @@ function c71921856.atkval(e,c)
return c:GetOverlayCount()*100 return c:GetOverlayCount()*100
end end
function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp) function c71921856.spcon(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetHandler():GetOverlayCount() local c=e:GetHandler()
local ct=c:GetOverlayCount()
e:SetLabel(ct) e:SetLabel(ct)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():GetReasonPlayer()~=tp return c:IsReason(REASON_DESTROY) and c:GetReasonPlayer()~=tp
and e:GetHandler():GetPreviousControler()==tp and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end end
function c71921856.spfilter(c,e,tp) function c71921856.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0x84) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
...@@ -29,10 +29,10 @@ function c8038143.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -29,10 +29,10 @@ function c8038143.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
local tc=te:GetHandler() local tc=te:GetHandler()
ng:AddCard(tc) ng:AddCard(tc)
if tc:IsOnField() and tc:IsRelateToEffect(te) then if tc:IsOnField() and tc:IsRelateToEffect(te) and not tc:IsHasEffect(EFFECT_CANNOT_TO_DECK) then
dg:AddCard(tc) dg:AddCard(tc)
end end
end end
...@@ -45,10 +45,10 @@ function c8038143.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,10 +45,10 @@ function c8038143.activate(e,tp,eg,ep,ev,re,r,rp)
local dg=Group.CreateGroup() local dg=Group.CreateGroup()
for i=1,ev do for i=1,ev do
local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER) local te,tgp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if tgp~=tp then if tgp~=tp and (te:IsActiveType(TYPE_MONSTER) or te:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(i) then
Duel.NegateActivation(i) Duel.NegateActivation(i)
local tc=te:GetHandler() local tc=te:GetHandler()
if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) then if tc:IsRelateToEffect(e) and tc:IsRelateToEffect(te) and not tc:IsHasEffect(EFFECT_CANNOT_TO_DECK) then
tc:CancelToGrave() tc:CancelToGrave()
dg:AddCard(tc) dg:AddCard(tc)
end end
......
...@@ -56,6 +56,7 @@ function c84268896.drtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,6 +56,7 @@ function c84268896.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c84268896.drop(e,tp,eg,ep,ev,re,r,rp) function c84268896.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT) Duel.Draw(p,d,REASON_EFFECT)
end end
...@@ -27,7 +27,7 @@ function c85827713.sfilter(c) ...@@ -27,7 +27,7 @@ function c85827713.sfilter(c)
return c:IsFaceup() and c:IsSetCard(0x8d) return c:IsFaceup() and c:IsSetCard(0x8d)
end end
function c85827713.sumcon(e) function c85827713.sumcon(e)
return Duel.IsExistingMatchingCard(c85827713.sfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c85827713.sfilter,0,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end end
function c85827713.limcon(e,tp,eg,ep,ev,re,r,rp) function c85827713.limcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
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