Commit a4d49523 authored by VanillaSalt's avatar VanillaSalt

fix

parent 3e96b3a8
...@@ -59,7 +59,7 @@ end ...@@ -59,7 +59,7 @@ end
function c11609969.scop(e,tp,eg,ep,ev,re,r,rp) function c11609969.scop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local scl=math.max(1,e:GetHandler():GetLeftScale()-2) local scl=math.max(1,c:GetLeftScale()-2)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE) e1:SetCode(EFFECT_CHANGE_LSCALE)
......
...@@ -33,13 +33,12 @@ function c20409757.initial_effect(c) ...@@ -33,13 +33,12 @@ function c20409757.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
-- --
local e6=Effect.CreateEffect(c) local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EFFECT_INDESTRUCTABLE_COUNT) e6:SetCode(EFFECT_DESTROY_REPLACE)
e6:SetRange(LOCATION_MZONE) e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(LOCATION_SZONE,0)
e6:SetTarget(c20409757.indtg)
e6:SetCountLimit(1) e6:SetCountLimit(1)
e6:SetValue(c20409757.valcon) e6:SetTarget(c20409757.indtg)
e6:SetValue(c20409757.indval)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function c20409757.condition(e,tp,eg,ep,ev,re,r,rp) function c20409757.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -68,9 +67,14 @@ function c20409757.slcon(e) ...@@ -68,9 +67,14 @@ function c20409757.slcon(e)
local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq) local tc=Duel.GetFieldCard(e:GetHandlerPlayer(),LOCATION_SZONE,13-seq)
return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99)) return not tc or (not tc:IsSetCard(0x98) and not tc:IsSetCard(0x99))
end end
function c20409757.indtg(e,c) function c20409757.filter(c,tp)
return c:GetSequence()==6 or c:GetSequence()==7 return c:IsControler(tp) and c:IsLocation(LOCATION_SZONE) and (c:GetSequence()==6 or c:GetSequence()==7)
and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp
end
function c20409757.indtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(c20409757.filter,1,nil,tp) end
return true
end end
function c20409757.valcon(e,re,r,rp) function c20409757.indval(e,c)
return rp~=e:GetHandlerPlayer() and bit.band(r,REASON_EFFECT)~=0 return c20409757.filter(c,e:GetHandlerPlayer())
end end
...@@ -11,17 +11,17 @@ function c22648577.initial_effect(c) ...@@ -11,17 +11,17 @@ function c22648577.initial_effect(c)
end end
function c22648577.filter(c) function c22648577.filter(c)
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return false end if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return false end
if c:IsLocation(LOCATION_SZONE) and c:GetSequence()<6 then return false end if c:IsLocation(LOCATION_SZONE) then
if c:GetSequence()<6 then return false end
elseif not c:IsType(TYPE_MONSTER) then return false end
return c:IsSetCard(0xaf) and c:IsAbleToDeck() return c:IsSetCard(0xaf) and c:IsAbleToDeck()
end end
function c22648577.thfilter(c) function c22648577.thfilter(c)
return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand() return c:IsSetCard(0xaf) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end end
function c22648577.target(e,tp,eg,ep,ev,re,r,rp,chk) function c22648577.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) if chk==0 then return Duel.IsExistingMatchingCard(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,3,nil) end
and Duel.IsExistingMatchingCard(c22648577.thfilter,tp,LOCATION_DECK,0,2,nil) end
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,3,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,2,tp,LOCATION_DECK)
end end
function c22648577.operation(e,tp,eg,ep,ev,re,r,rp) function c22648577.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,nil) local g=Duel.GetMatchingGroup(c22648577.filter,tp,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_HAND,0,nil)
...@@ -31,10 +31,11 @@ function c22648577.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,10 +31,11 @@ function c22648577.operation(e,tp,eg,ep,ev,re,r,rp)
local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND) local cg=sg:Filter(Card.IsLocation,nil,LOCATION_HAND)
Duel.ConfirmCards(1-tp,cg) Duel.ConfirmCards(1-tp,cg)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT) Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
local dg=Duel.GetMatchingGroup(c22648577.thfilter,tp,LOCATION_DECK,0,nil)
if dg:GetCount()>1 and Duel.SelectYesNo(tp,aux.Stringid(22648577,0)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.SelectMatchingCard(tp,c22648577.thfilter,tp,LOCATION_DECK,0,2,2,nil) local tg=dg:Select(tp,2,2,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT) Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg) Duel.ConfirmCards(1-tp,tg)
end end
......
...@@ -36,6 +36,5 @@ function c35037880.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,6 +36,5 @@ function c35037880.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT) Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
Duel.ShuffleHand(tp)
end end
end end
...@@ -37,7 +37,7 @@ function c48210156.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,7 +37,7 @@ function c48210156.spop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROY)
e3:SetLabel(tp) e3:SetLabel(tp)
e3:SetOperation(c48210156.damop) e3:SetOperation(c48210156.damop)
e3:SetReset(RESET_EVENT+0x1fe0000) e3:SetReset(RESET_EVENT+0x1fe0000)
...@@ -53,7 +53,7 @@ function c48210156.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +53,7 @@ function c48210156.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c48210156.splimit(e,c) function c48210156.splimit(e,c)
return not c:IsRace(RACE_FIEND) return c:IsRace(0xffffff-RACE_FIEND)
end end
function c48210156.damop(e,tp,eg,ep,ev,re,r,rp) function c48210156.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(e:GetLabel(),1000,REASON_EFFECT) Duel.Damage(e:GetLabel(),1000,REASON_EFFECT)
......
...@@ -17,7 +17,7 @@ function c52551211.initial_effect(c) ...@@ -17,7 +17,7 @@ function c52551211.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,52551212) e2:SetCountLimit(1,52551211)
e2:SetCondition(c52551211.poscon) e2:SetCondition(c52551211.poscon)
e2:SetTarget(c52551211.postg) e2:SetTarget(c52551211.postg)
e2:SetOperation(c52551211.posop) e2:SetOperation(c52551211.posop)
......
...@@ -4,7 +4,7 @@ function c5672432.initial_effect(c) ...@@ -4,7 +4,7 @@ function c5672432.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_DESTROYED)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(c5672432.condition) e1:SetCondition(c5672432.condition)
e1:SetTarget(c5672432.target) e1:SetTarget(c5672432.target)
...@@ -12,7 +12,7 @@ function c5672432.initial_effect(c) ...@@ -12,7 +12,7 @@ function c5672432.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c5672432.cfilter(c,tp) function c5672432.cfilter(c,tp)
return c:IsReason(REASON_DESTROY) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
end end
function c5672432.condition(e,tp,eg,ep,ev,re,r,rp) function c5672432.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c5672432.cfilter,1,nil,tp) return eg:IsExists(c5672432.cfilter,1,nil,tp)
......
...@@ -53,6 +53,13 @@ function c71422989.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -53,6 +53,13 @@ function c71422989.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71422989.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c71422989.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c71422989.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c71422989.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c71422989.activate(e,tp,eg,ep,ev,re,r,rp) function c71422989.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c71422989.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c71422989.filter,tp,LOCATION_DECK,0,1,1,nil)
...@@ -93,10 +100,3 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -93,10 +100,3 @@ function c71422989.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
end end
function c71422989.filter1(c,e)
return c:IsCanBeFusionMaterial() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c71422989.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x1047) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
...@@ -45,8 +45,8 @@ function c9765723.cfilter(c) ...@@ -45,8 +45,8 @@ function c9765723.cfilter(c)
return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGraveAsCost() return (c:IsSetCard(0xaf) or c:IsSetCard(0xae)) and c:IsAbleToGraveAsCost()
end end
function c9765723.descost(e,tp,eg,ep,ev,re,r,rp,chk) function c9765723.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c9765723.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c9765723.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c9765723.cfilter,1,1,REASON_COST,e:GetHandler()) Duel.DiscardHand(tp,c9765723.cfilter,1,1,REASON_COST)
end end
function c9765723.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c9765723.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
......
...@@ -26,7 +26,7 @@ function c987311.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c987311.spcon(e,tp,eg,ep,ev,re,r,rp)
return not eg:IsContains(e:GetHandler()) and eg:IsExists(c987311.cfilter,1,nil,tp) return not eg:IsContains(e:GetHandler()) and eg:IsExists(c987311.cfilter,1,nil,tp)
end end
function c987311.spfilter(c,e,tp) function c987311.spfilter(c,e,tp)
return c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsLevelBelow(4) and c:IsSetCard(0xaf) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c987311.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c987311.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c987311.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c987311.spfilter(chkc,e,tp) 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