Commit f097cb0a authored by VanillaSalt's avatar VanillaSalt

fix

parent 20309d99
...@@ -9,17 +9,23 @@ function c13803864.initial_effect(c) ...@@ -9,17 +9,23 @@ function c13803864.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_LEAVE_FIELD) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c13803864.spcon) e1:SetCondition(c13803864.spcon)
e1:SetTarget(c13803864.sptg) e1:SetTarget(c13803864.sptg)
e1:SetOperation(c13803864.spop) e1:SetOperation(c13803864.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_REMOVE)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e3)
end end
function c13803864.spfilter(c,e,tp) function c13803864.spfilter(c,e,tp)
return c:IsCode(27288416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCode(27288416) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c13803864.spcon(e,tp,eg,ep,ev,re,r,rp) function c13803864.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP) and not e:GetHandler():IsLocation(LOCATION_DECK) return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end end
function c13803864.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c13803864.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c26822796.activate(e,tp,eg,ep,ev,re,r,rp) function c26822796.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and not tc:IsDisabled() then if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -3,31 +3,37 @@ function c40854197.initial_effect(c) ...@@ -3,31 +3,37 @@ function c40854197.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),true) aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsSetCard,0x8),aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_WATER),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(c40854197.splimit)
c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(40854197,0)) e2:SetDescription(aux.Stringid(40854197,0))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_LEAVE_FIELD) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c40854197.descondition) e2:SetCondition(c40854197.descon)
e2:SetTarget(c40854197.destarget) e2:SetTarget(c40854197.destg)
e2:SetOperation(c40854197.desoperation) e2:SetOperation(c40854197.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup local e3=e2:Clone()
local e3=Effect.CreateEffect(c) e3:SetCode(EVENT_REMOVE)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c40854197.atkup)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--spsummon condition local e4=e2:Clone()
local e4=Effect.CreateEffect(c) e4:SetCode(EVENT_TO_DECK)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e4:SetCode(EFFECT_SPSUMMON_CONDITION)
e4:SetValue(c40854197.splimit)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--atkup
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetRange(LOCATION_MZONE)
e5:SetCode(EFFECT_UPDATE_ATTACK)
e5:SetValue(c40854197.atkup)
c:RegisterEffect(e5)
end end
function c40854197.splimit(e,se,sp,st) function c40854197.splimit(e,se,sp,st)
return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION return bit.band(st,SUMMON_TYPE_FUSION)==SUMMON_TYPE_FUSION
...@@ -38,16 +44,15 @@ end ...@@ -38,16 +44,15 @@ end
function c40854197.atkup(e,c) function c40854197.atkup(e,c)
return Duel.GetMatchingGroupCount(c40854197.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500 return Duel.GetMatchingGroupCount(c40854197.atkfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)*500
end end
function c40854197.descondition(e,tp,eg,ep,ev,re,r,rp) function c40854197.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() return e:GetHandler():IsPreviousPosition(POS_FACEUP) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
return c:IsPreviousPosition(POS_FACEUP)
end end
function c40854197.destarget(e,tp,eg,ep,ev,re,r,rp,chk) function c40854197.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c40854197.desoperation(e,tp,eg,ep,ev,re,r,rp) function c40854197.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
end end
...@@ -28,13 +28,13 @@ end ...@@ -28,13 +28,13 @@ end
function c42752141.target(e,tp,eg,ep,ev,re,r,rp,chk) function c42752141.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and (re:GetActivateLocation()==LOCATION_EXTRA or re:GetHandler():IsRelateToEffect(re)) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c42752141.operation(e,tp,eg,ep,ev,re,r,rp) function c42752141.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if re:GetActivateLocation()==LOCATION_EXTRA or re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -21,13 +21,13 @@ end ...@@ -21,13 +21,13 @@ end
function c49010598.target(e,tp,eg,ep,ev,re,r,rp,chk) function c49010598.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and (re:GetActivateLocation()==LOCATION_EXTRA or re:GetHandler():IsRelateToEffect(re)) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
function c49010598.activate(e,tp,eg,ep,ev,re,r,rp) function c49010598.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev) Duel.NegateActivation(ev)
if re:GetActivateLocation()==LOCATION_EXTRA or re:GetHandler():IsRelateToEffect(re) then if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT) Duel.Destroy(eg,REASON_EFFECT)
end end
end end
...@@ -24,7 +24,7 @@ end ...@@ -24,7 +24,7 @@ end
function c58120309.target(e,tp,eg,ep,ev,re,r,rp,chk) function c58120309.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and (re:GetActivateLocation()==LOCATION_EXTRA or re:GetHandler():IsRelateToEffect(re)) then if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end end
end end
...@@ -32,7 +32,7 @@ function c58120309.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -32,7 +32,7 @@ function c58120309.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler() local tc=re:GetHandler()
if not tc:IsDisabled() then if not tc:IsDisabled() then
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
if (re:GetActivateLocation()==LOCATION_EXTRA or tc:IsRelateToEffect(re)) and Duel.Destroy(eg,REASON_EFFECT)~=0 then if tc:IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 then
local sc=Duel.GetFirstMatchingCard(c58120309.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp) local sc=Duel.GetFirstMatchingCard(c58120309.sfilter,tp,LOCATION_EXTRA,0,nil,e,tp)
if sc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(58120309,0)) then if sc and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(58120309,0)) then
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -22,15 +22,13 @@ end ...@@ -22,15 +22,13 @@ end
function c86848580.filter1(c) function c86848580.filter1(c)
return c:IsFaceup() and not c:IsDisabled() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT)) return c:IsFaceup() and not c:IsDisabled() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT))
end end
function c86848580.filter2(c)
return c:IsFaceup() and (c:IsLocation(LOCATION_SZONE) or c:IsType(TYPE_EFFECT))
end
function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c86848580.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86848580.filter1,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c86848580.filter1,tp,0,LOCATION_ONFIELD,1,nil) end
end end
function c86848580.disop(e,tp,eg,ep,ev,re,r,rp) function c86848580.disop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c86848580.filter2,tp,0,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(c86848580.filter1,tp,0,LOCATION_ONFIELD,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if not tc then return end
local c=e:GetHandler() local c=e:GetHandler()
while tc do while tc do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -45,7 +43,7 @@ function c86848580.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,7 +43,7 @@ function c86848580.disop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
tc=g:GetNext() tc=g:GetNext()
end end
local atk=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,e:GetHandler())*300 local atk=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)*300
if atk>0 then if atk>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
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