Commit f3d01457 authored by VanillaSalt's avatar VanillaSalt

fix

parent 412f2176
...@@ -49,9 +49,9 @@ function c10000090.initial_effect(c) ...@@ -49,9 +49,9 @@ function c10000090.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c10000090.cfilter(c,tp) function c10000090.cfilter(c,tp)
return c:IsCode(10000010) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP) return c:IsCode(10000010) and c:IsControler(tp) and c:IsPreviousLocation(LOCATION_ONFIELD)
end end
function c10000090.spcon1(e,tp,eg,ep,ev,re,r,rp,chk) function c10000090.spcon1(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c10000090.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c10000090.cfilter,1,nil,tp)
end end
function c10000090.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c10000090.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -74,7 +74,7 @@ function c10000090.tgcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -74,7 +74,7 @@ function c10000090.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c10000090.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c10000090.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_MZONE)
end end
function c10000090.tgop(e,tp,eg,ep,ev,re,r,rp) function c10000090.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -33,20 +33,29 @@ function c2129638.initial_effect(c) ...@@ -33,20 +33,29 @@ function c2129638.initial_effect(c)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_EXTRA_ATTACK) e4:SetCode(EFFECT_EXTRA_ATTACK)
e4:SetCondition(c2129638.datcon)
e4:SetValue(1) e4:SetValue(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--remove
local e5=Effect.CreateEffect(c) local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(2129638,0)) e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCategory(CATEGORY_REMOVE)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_MZONE) e5:SetRange(LOCATION_MZONE)
e5:SetCode(EVENT_DAMAGE_STEP_END) e5:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e5:SetCondition(c2129638.rmcon) e5:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e5:SetTarget(c2129638.rmtg) e5:SetCondition(c2129638.dircon)
e5:SetOperation(c2129638.rmop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_CANNOT_ATTACK)
e6:SetCondition(c2129638.atkcon)
c:RegisterEffect(e6)
--remove
local e7=Effect.CreateEffect(c)
e7:SetDescription(aux.Stringid(2129638,0))
e7:SetCategory(CATEGORY_REMOVE)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_DAMAGE_STEP_END)
e7:SetCondition(c2129638.rmcon)
e7:SetTarget(c2129638.rmtg)
e7:SetOperation(c2129638.rmop)
c:RegisterEffect(e7)
end end
function c2129638.splimit(e,se,sp,st) function c2129638.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
...@@ -66,9 +75,11 @@ function c2129638.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -66,9 +75,11 @@ function c2129638.spop(e,tp,eg,ep,ev,re,r,rp,c)
c:SetMaterial(g) c:SetMaterial(g)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c2129638.datcon(e) function c2129638.dircon(e)
local c=e:GetHandler() return e:GetHandler():GetAttackAnnouncedCount()>0
return Duel.IsExistingMatchingCard(Card.IsCanBeBattleTarget,c:GetControler(),0,LOCATION_MZONE,1,nil,c) end
function c2129638.atkcon(e)
return e:GetHandler():IsDirectAttacked()
end end
function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp) function c2129638.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -30,6 +30,7 @@ function c39913299.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -30,6 +30,7 @@ function c39913299.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
local g=Duel.GetMatchingGroup(c39913299.filter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c39913299.filter,tp,LOCATION_DECK,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(39913299,0)) then if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(39913299,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39913299,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(39913299,1))
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
local sc=sg:GetFirst() local sc=sg:GetFirst()
......
...@@ -8,28 +8,18 @@ function c43730887.initial_effect(c) ...@@ -8,28 +8,18 @@ function c43730887.initial_effect(c)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c43730887.target) e1:SetTarget(c43730887.target)
e1:SetOperation(c43730887.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local e2=e1:Clone() local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS) e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_CHAIN_SOLVED)
e3:SetCondition(c43730887.tgcon)
e3:SetOperation(c43730887.tgop)
e3:SetLabelObject(e1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetLabelObject(e2)
c:RegisterEffect(e4)
--disable --disable
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_DISABLE) e4:SetCode(EFFECT_DISABLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetTarget(c43730887.distg) e4:SetTarget(c43730887.distg)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--cannot attack --cannot attack
...@@ -49,9 +39,6 @@ function c43730887.initial_effect(c) ...@@ -49,9 +39,6 @@ function c43730887.initial_effect(c)
e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e7:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c43730887.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c43730887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c43730887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then return true end if chk==0 then return true end
...@@ -59,13 +46,10 @@ function c43730887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -59,13 +46,10 @@ function c43730887.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end end
function c43730887.tgcon(e,tp,eg,ep,ev,re,r,rp) function c43730887.operation(e,tp,eg,ep,ev,re,r,rp)
return re==e:GetLabelObject()
end
function c43730887.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS):GetFirst() local tc=Duel.GetFirstTarget()
if tc and c:IsRelateToEffect(re) and tc:IsFaceup() and tc:IsRelateToEffect(re) then if c:IsRelateToEffect(re) and tc:IsFaceup() and tc:IsRelateToEffect(e) then
c:SetCardTarget(tc) c:SetCardTarget(tc)
end end
end 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