Commit c8882e2d authored by VanillaSalt's avatar VanillaSalt

fix script

parent 451740fe
...@@ -9,7 +9,7 @@ function c11159464.initial_effect(c) ...@@ -9,7 +9,7 @@ function c11159464.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--discard --discard
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56074358,0)) e2:SetDescription(aux.Stringid(11159464,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE) e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c11159464.tgcon) e2:SetCondition(c11159464.tgcon)
......
...@@ -16,7 +16,7 @@ function c12423762.initial_effect(c) ...@@ -16,7 +16,7 @@ function c12423762.initial_effect(c)
e2:SetDescription(aux.Stringid(12423762,1)) e2:SetDescription(aux.Stringid(12423762,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET) e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetTarget(c12423762.indcost) e2:SetCost(c12423762.indcost)
e2:SetOperation(c12423762.indop) e2:SetOperation(c12423762.indop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -26,10 +26,10 @@ function c13002461.filter(c) ...@@ -26,10 +26,10 @@ function c13002461.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(1) return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(1)
end end
function c13002461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c13002461.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c13002461.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c13002461.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c13002461.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c13002461.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c13002461.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c13002461.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c13002461.operation(e,tp,eg,ep,ev,re,r,rp) function c13002461.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -18,7 +18,7 @@ function c13250922.initial_effect(c) ...@@ -18,7 +18,7 @@ function c13250922.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--destroy --destroy
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(83021423,0)) e3:SetDescription(aux.Stringid(13250922,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET) e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_DESTROY) e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
......
...@@ -22,7 +22,6 @@ function c135598.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -22,7 +22,6 @@ function c135598.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c135598.operation(e,tp,eg,ep,ev,re,r,rp) function c135598.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c135598.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c135598.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -21,5 +21,5 @@ end ...@@ -21,5 +21,5 @@ end
function c13945283.operation(e,tp,eg,ep,ev,re,r,rp) function c13945283.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end if not a:IsRelateToBattle() then return end
Duel.SendtoHand(a,nil,0,REASON_EFFECT) Duel.SendtoHand(a,nil,REASON_EFFECT)
end end
...@@ -11,15 +11,15 @@ function c13955608.initial_effect(c) ...@@ -11,15 +11,15 @@ function c13955608.initial_effect(c)
end end
function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk) function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and
Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_ROCK,ATTRIBUTE_EARTH) end Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c13955608.activate(e,tp,eg,ep,ev,re,r,rp) function c13955608.activate(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
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_ROCK,ATTRIBUTE_EARTH) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddTrapMonsterAttribute(true,ATTRIBUTE_EARTH,RACE_ROCK,4,0,2000) c:AddTrapMonsterAttribute(true,ATTRIBUTE_EARTH,RACE_MACHINE,4,0,2000)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE) Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
c:TrapMonsterBlock() c:TrapMonsterBlock()
--cannot attack --cannot attack
......
...@@ -29,10 +29,10 @@ end ...@@ -29,10 +29,10 @@ end
function c14154221.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c14154221.target(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
if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING) if chk==0 then return e:GetHandler():IsRelateToEffect(e) and not e:GetHandler():IsStatus(STATUS_CHAINING)
and Duel.IsExistingMatchingCard(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end and Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c14154221.operation(e,tp,eg,ep,ev,re,r,rp) function c14154221.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
......
...@@ -52,12 +52,12 @@ function c16197610.spfilter(c,e,tp) ...@@ -52,12 +52,12 @@ function c16197610.spfilter(c,e,tp)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY) and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end end
function c16197610.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c16197610.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)~=0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingMatchingCard(c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end end
function c16197610.spop(e,tp,eg,ep,ev,re,r,rp) function c16197610.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()~=0 then if g:GetCount()~=0 then
......
...@@ -15,6 +15,9 @@ function c16550875.initial_effect(c) ...@@ -15,6 +15,9 @@ function c16550875.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK) e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800) e2:SetValue(800)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
--Equip limit --Equip limit
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -23,7 +23,6 @@ function c16796157.thtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +23,6 @@ function c16796157.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_DECK)
end end
function c16796157.thop(e,tp,eg,ep,ev,re,r,rp) function c16796157.thop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -14,7 +14,7 @@ function c16825874.initial_effect(c) ...@@ -14,7 +14,7 @@ function c16825874.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTarget(c16825874.ccon) e2:SetCondition(c16825874.ccon)
e2:SetOperation(c16825874.cop) e2:SetOperation(c16825874.cop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -6,7 +6,7 @@ function c16828633.initial_effect(c) ...@@ -6,7 +6,7 @@ function c16828633.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCost(c16828633.condition) e1:SetCondition(c16828633.condition)
e1:SetOperation(c16828633.operation) e1:SetOperation(c16828633.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -4,8 +4,8 @@ function c17985575.initial_effect(c) ...@@ -4,8 +4,8 @@ function c17985575.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c17985575.etarget) e1:SetTarget(c17985575.etarget)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -35,7 +35,7 @@ function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,7 +35,7 @@ function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eq=Duel.SelectMatchingCard(tp,c18060565.eqfilter,tp,LOCATION_DECK,0,1,1,nil) local eq=Duel.SelectMatchingCard(tp,c18060565.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
local eqc=eq:GetFirst() local eqc=eq:GetFirst()
if eqc and Duel.Equip(tp,eqc,tc,false) then if eqc and Duel.Equip(tp,eqc,tc,true) then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
......
...@@ -69,7 +69,7 @@ function c18096222.dafilter(c) ...@@ -69,7 +69,7 @@ function c18096222.dafilter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState() return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end end
function c18096222.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c18096222.datg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc.IsLocation(LOCATION_MZONE) and c18096222.dafilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c18096222.dafilter(chkc) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
...@@ -17,7 +17,7 @@ function c18158397.initial_effect(c) ...@@ -17,7 +17,7 @@ function c18158397.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c18158397.cfilter(c,tp) function c18158397.cfilter(c,tp)
return c:IsControler(tp) and c:GetPreviousControler(tp) return c:IsControler(tp) and c:GetPreviousControler()==tp
end end
function c18158397.condition(e,tp,eg,ep,ev,re,r,rp) function c18158397.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,0x41)==0x41 and re and re:GetHandler():IsSetCard(0x18) return bit.band(r,0x41)==0x41 and re and re:GetHandler():IsSetCard(0x18)
......
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function c20188127.activate(e,tp,eg,ep,ev,re,r,rp) function c20188127.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,0,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -4,6 +4,7 @@ function c20529766.initial_effect(c) ...@@ -4,6 +4,7 @@ function c20529766.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c20529766.condition)
e1:SetOperation(c20529766.operation) e1:SetOperation(c20529766.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--tribute check --tribute check
......
...@@ -4,7 +4,7 @@ function c20858318.initial_effect(c) ...@@ -4,7 +4,7 @@ function c20858318.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c20858318.con) e1:SetCondition(c20858318.con)
e1:SetOperation(c20858318.op) e1:SetOperation(c20858318.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -67,7 +67,7 @@ function c21977828.spfilter(c,e,tp) ...@@ -67,7 +67,7 @@ function c21977828.spfilter(c,e,tp)
return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c21977828.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c21977828.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21977828.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c21977828.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetFlagEffect(tp,21977828)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetFlagEffect(tp,21977828)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c21977828.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c21977828.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -18,15 +18,15 @@ function c27340877.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -18,15 +18,15 @@ function c27340877.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingTarget(c27340877.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c27340877.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
Duel.SelectTarget(tp,c27340877.filter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c27340877.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,563) Duel.Hint(HINT_SELECTMSG,1-tp,562)
local rc=Duel.AnnounceRace(1-tp,2,0xffffff) local rc=Duel.AnnounceAttribute(1-tp,2,0xffffff)
e:SetLabel(rc) e:SetLabel(rc)
end end
function c27340877.activate(e,tp,eg,ep,ev,re,r,rp) function c27340877.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
if tc:IsRace(e:GetLabel()) then if tc:IsAttribute(e:GetLabel()) then
Duel.Draw(1-tp,2,REASON_EFFECT) Duel.Draw(1-tp,2,REASON_EFFECT)
else else
Duel.Draw(tp,2,REASON_EFFECT) Duel.Draw(tp,2,REASON_EFFECT)
......
...@@ -18,13 +18,11 @@ function c27655513.filter(c) ...@@ -18,13 +18,11 @@ function c27655513.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave() return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
end end
function c27655513.target(e,tp,eg,ep,ev,re,r,rp,chk) function c27655513.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27655513.filter,tp,LOCATION_DECK,0,2,nil) end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end end
function c27655513.operation(e,tp,eg,ep,ev,re,r,rp) function c27655513.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c27655513.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()<2 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:Select(tp,2,2,nil) local g=Duel.SelectMatchingCard(tp,c27655513.filter,tp,LOCATION_DECK,0,2,2,nil)
Duel.SendtoGrave(sg,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
...@@ -19,14 +19,14 @@ function c27821104.filter(c,e,tp) ...@@ -19,14 +19,14 @@ function c27821104.filter(c,e,tp)
end end
function c27821104.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27821104.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c27821104.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c27821104.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c27821104.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c27821104.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c27821104.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c27821104.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c27821104.activate(e,tp,eg,ep,ev,re,r,rp) function c27821104.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -66,8 +66,8 @@ function c27970830.filter1(c) ...@@ -66,8 +66,8 @@ function c27970830.filter1(c)
return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT) return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT)
end end
function c27970830.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27970830.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c27970830.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27970830.filter1(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500)
...@@ -114,8 +114,8 @@ function c27970830.filter3(c,e,tp) ...@@ -114,8 +114,8 @@ function c27970830.filter3(c,e,tp)
return c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x20) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c27970830.filter3(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c27970830.filter3(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c27970830.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c27970830.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c27970830.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c27970830.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -123,7 +123,7 @@ function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -123,7 +123,7 @@ function c27970830.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c27970830.op3(e,tp,eg,ep,ev,re,r,rp) function c27970830.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -24,7 +24,7 @@ function c30126992.initial_effect(c) ...@@ -24,7 +24,7 @@ function c30126992.initial_effect(c)
end end
function c30126992.spcon(e,c) function c30126992.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
return ct>4 return ct>4
......
...@@ -5,7 +5,7 @@ function c31000575.initial_effect(c) ...@@ -5,7 +5,7 @@ function c31000575.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c31000575.target) e1:SetTarget(c31000575.target)
e1:SetOperation(c31000575.operation) e1:SetOperation(c31000575.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -18,13 +18,12 @@ function c31328739.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -18,13 +18,12 @@ function c31328739.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c31328739.target(e,tp,eg,ep,ev,re,r,rp,chk) function c31328739.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsPlayerCanDraw(1-tp,3) end if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0 and Duel.IsPlayerCanDraw(1-tp,3) end
local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
end end
function c31328739.activate(e,tp,eg,ep,ev,re,r,rp) function c31328739.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER) local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local g=Duel.GetFieldGroup(p,LOCATION_HAND,0) local g=Duel.GetFieldGroup(p,LOCATION_HAND,0)
if Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)==0 then return end if g:GetCount()==0 then return end
Duel.SendtoDeck(g,nil,2,REASON_EFFECT) Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.ShuffleDeck(p) Duel.ShuffleDeck(p)
Duel.BreakEffect() Duel.BreakEffect()
......
...@@ -31,7 +31,10 @@ function c31826057.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,10 @@ function c31826057.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31826057.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c31826057.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,563)
local rc=Duel.AnnounceRace(tp,1,0xffffff)
e:SetLabel(rc)
end end
function c31826057.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c31826057.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31826057.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c31826057.filter(chkc) end
......
...@@ -12,6 +12,9 @@ function c3366982.initial_effect(c) ...@@ -12,6 +12,9 @@ function c3366982.initial_effect(c)
end end
c3366982.material_count=2 c3366982.material_count=2
c3366982.material={88819587,64428736} c3366982.material={88819587,64428736}
function c3366982.filter(c)
return c:IsFaceup() and c:IsAttribute(0xf8)
end
function c3366982.dircon(e) function c3366982.dircon(e)
return not Duel.IsExistingMatchingCard(c3366982.filter,e:GetHandler():GetControler(),0,LOCATION_MZONE,1,nil) return not Duel.IsExistingMatchingCard(c3366982.filter,e:GetHandlerPlayer(),0,LOCATION_MZONE,1,nil)
end end
...@@ -25,7 +25,7 @@ end ...@@ -25,7 +25,7 @@ end
function c33970665.activate(e,tp,eg,ep,ev,re,r,rp) function c33970665.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
if g:GetCount()==0 or (ft1==0 and ft2==0) then return end if g:GetCount()==0 or (ft1==0 and ft2==0) then return end
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=g:Select(1-tp,1,1,nil):GetFirst() local tc=g:Select(1-tp,1,1,nil):GetFirst()
......
...@@ -12,7 +12,7 @@ function c34149830.initial_effect(c) ...@@ -12,7 +12,7 @@ function c34149830.initial_effect(c)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c34149830.condition) e2:SetCondition(c34149830.condition)
e2:SetCost(c34149830.target) e2:SetTarget(c34149830.target)
e2:SetOperation(c34149830.operation) e2:SetOperation(c34149830.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -16,7 +16,7 @@ function c35149085.filter(c) ...@@ -16,7 +16,7 @@ function c35149085.filter(c)
end end
function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c35149085.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c35149085.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
...@@ -26,7 +26,7 @@ function c35798491.mtop(e,tp,eg,ep,ev,re,r,rp) ...@@ -26,7 +26,7 @@ function c35798491.mtop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c35798491.filter(c,tp) function c35798491.filter(c,tp)
return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard() return c:IsLocation(LOCATION_MZONE) and c:IsControler(tp) and c:IsFaceup() and c:IsSetCard(0x45)
end end
function c35798491.disop(e,tp,eg,ep,ev,re,r,rp) function c35798491.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return end if ep==tp then return end
......
...@@ -59,7 +59,7 @@ function c36870345.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c36870345.descon(e,tp,eg,ep,ev,re,r,rp)
return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET) return c:GetPreviousLocation()==LOCATION_SZONE and not c:IsReason(REASON_LOST_TARGET)
end end
function c36870345.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c36870345.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
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
...@@ -25,7 +25,7 @@ function c38742075.initial_effect(c) ...@@ -25,7 +25,7 @@ function c38742075.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c38742075.cfilter(c,tp) function c38742075.cfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsControler(tp) return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
end end
function c38742075.distg(e,c) function c38742075.distg(e,c)
return c:GetCardTargetCount()>0 and c:IsType(TYPE_SPELL) return c:GetCardTargetCount()>0 and c:IsType(TYPE_SPELL)
......
...@@ -32,7 +32,7 @@ end ...@@ -32,7 +32,7 @@ end
function c40189917.sumcon(e,c) function c40189917.sumcon(e,c)
if c==nil then return true end if c==nil then return true end
local g=Duel.GetTributeGroup(c) local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x2c) return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and g:IsExists(Card.IsSetCard,1,nil,0x2c)
end end
function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c) function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c) local g=Duel.GetTributeGroup(c)
......
...@@ -21,7 +21,7 @@ function c4081825.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,7 +21,7 @@ function c4081825.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(Card.IsDefencePos,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ChangePosition(g,POS_FACEUP_ATTACK) Duel.ChangePosition(g,POS_FACEUP_ATTACK)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,c4081825.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp) local sg=Duel.SelectMatchingCard(tp,c4081825.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=sg:GetFirst() local tc=sg:GetFirst()
......
...@@ -34,12 +34,10 @@ function c42280216.filter(c,e,tp) ...@@ -34,12 +34,10 @@ function c42280216.filter(c,e,tp)
return (code==78275321 or code==78552773) and c:IsAbleToHand() return (code==78275321 or code==78552773) and c:IsAbleToHand()
end end
function c42280216.shtg(e,tp,eg,ep,ev,re,r,rp,chk) function c42280216.shtg(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.IsExistingMatchingCard(c42280216.filter,tp,LOCATION_DECK,0,1,nil) end
and Duel.IsExistingMatchingCard(c42280216.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 c42280216.shop(e,tp,eg,ep,ev,re,r,rp) function c42280216.shop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c42280216.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c42280216.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -10,7 +10,7 @@ function c44505297.initial_effect(c) ...@@ -10,7 +10,7 @@ function c44505297.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP) e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c44505297.eqcon) e1:SetCondition(c44505297.eqcon)
e1:SetTarget(c44505297.eqtg) e1:SetTarget(c44505297.eqtg)
e1:SetOperation(c44505297.eqop) e1:SetOperation(c44505297.eqop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -15,7 +15,7 @@ function c44635489.initial_effect(c) ...@@ -15,7 +15,7 @@ function c44635489.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c44635489.lvtg) e2:SetTarget(c44635489.lvtg)
e2:SetOperation(c44635489.lvop) e2:SetOperation(c44635489.lvop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--xyzlimit --xyzlimit
...@@ -38,7 +38,7 @@ function c44635489.filter(c,clv) ...@@ -38,7 +38,7 @@ function c44635489.filter(c,clv)
and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE)) and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE))
end end
function c44635489.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c44635489.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c44635489.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and c44635489.filter(chkc,e:GetHandler():GetLevel()) end
if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end if chk==0 then return Duel.IsExistingTarget(c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,e:GetHandler(),e:GetHandler():GetLevel()) end
Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel()) Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel())
end end
......
...@@ -19,11 +19,11 @@ function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,11 +19,11 @@ function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c44689688.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c44689688.sptg(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_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end end
function c44689688.spop(e,tp,eg,ep,ev,re,r,rp) function c44689688.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0 then return end if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,44689689,0,0x4011,300,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE,POS_FACEUP_ATTACK,1-tp) then if Duel.IsPlayerCanSpecialSummonMonster(tp,44689689,0,0x4011,300,0,1,RACE_DINOSAUR,ATTRIBUTE_FIRE,POS_FACEUP_ATTACK,1-tp) then
local token=Duel.CreateToken(tp,44689689) local token=Duel.CreateToken(tp,44689689)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -7,7 +7,7 @@ function c44792253.initial_effect(c) ...@@ -7,7 +7,7 @@ function c44792253.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_REMOVE) e1:SetCode(EVENT_REMOVE)
e1:SetCondition(c44792253.descon) e1:SetCondition(c44792253.descon)
e1:SetCost(c44792253.destg) e1:SetTarget(c44792253.destg)
e1:SetOperation(c44792253.desop) e1:SetOperation(c44792253.desop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -11,6 +11,6 @@ function c45439263.initial_effect(c) ...@@ -11,6 +11,6 @@ function c45439263.initial_effect(c)
end end
function c45439263.spcon(e,c) function c45439263.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
return Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3 return Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39):GetClassCount(Card.GetCode)>=3
end end
...@@ -20,7 +20,7 @@ function c46384403.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c46384403.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c46384403.filter(c,e,tp) function c46384403.filter(c,e,tp)
return c:IsCode(46384403) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN) return c:IsCode(46384403) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c46384403.operation(e,tp,eg,ep,ev,re,r,rp) function c46384403.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
...@@ -32,7 +32,7 @@ function c4722253.initial_effect(c) ...@@ -32,7 +32,7 @@ function c4722253.initial_effect(c)
end end
function c4722253.spcon(e,c) function c4722253.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT) local g=Duel.GetMatchingGroup(Card.IsAttribute,c:GetControler(),LOCATION_GRAVE,0,nil,ATTRIBUTE_LIGHT)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
return ct>4 return ct>4
......
...@@ -46,12 +46,12 @@ function c47436247.filter(c,ct,e,tp) ...@@ -46,12 +46,12 @@ function c47436247.filter(c,ct,e,tp)
and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c47436247.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c47436247.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x3003),e,tp) end and Duel.IsExistingMatchingCard(c47436247.filter,tp,LOCATION_DECK,0,1,nil,e:GetHandler():GetCounter(0x3003),e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end end
function c47436247.spop(e,tp,eg,ep,ev,re,r,rp) function c47436247.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local ct=e:GetLabel() local ct=e:GetLabel()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c47436247.filter,tp,LOCATION_DECK,0,1,1,nil,ct,e,tp) local g=Duel.SelectMatchingCard(tp,c47436247.filter,tp,LOCATION_DECK,0,1,1,nil,ct,e,tp)
......
...@@ -15,6 +15,7 @@ function c50263751.initial_effect(c) ...@@ -15,6 +15,7 @@ function c50263751.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c50263751.condition)
e2:SetOperation(c50263751.operation) e2:SetOperation(c50263751.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -68,7 +68,7 @@ function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -68,7 +68,7 @@ function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup() local g=Group.CreateGroup()
local tc=nil local tc=nil
for i=1,2 do for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst() tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else else
......
...@@ -8,7 +8,7 @@ function c53162898.initial_effect(c) ...@@ -8,7 +8,7 @@ function c53162898.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_DAMAGE_STEP_END) e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c53162898.condition) e1:SetCondition(c53162898.condition)
e1:SetCost(c53162898.target) e1:SetTarget(c53162898.target)
e1:SetOperation(c53162898.operation) e1:SetOperation(c53162898.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -19,8 +19,8 @@ function c54326448.filter(c) ...@@ -19,8 +19,8 @@ function c54326448.filter(c)
return c:IsFaceup() and c:IsSetCard(0x2c) return c:IsFaceup() and c:IsSetCard(0x2c)
end end
function c54326448.attg(e,tp,eg,ep,ev,re,r,rp,chk) function c54326448.attg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c54326448.filter,tp,LOCATION_MZONE,0,1,nil,tp) end if chk==0 then return Duel.CheckReleaseGroup(tp,c54326448.cfilter,1,nil,tp) end
local g=Duel.SelectMatchingCard(tp,c54326448.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectReleaseGroup(tp,c54326448.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c54326448.atop(e,tp,eg,ep,ev,re,r,rp) function c54326448.atop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -20,7 +20,7 @@ function c56840658.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -20,7 +20,7 @@ function c56840658.condition(e,tp,eg,ep,ev,re,r,rp)
else return bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 end else return bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 end
end end
function c56840658.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c56840658.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0 end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1) Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
...@@ -23,7 +23,7 @@ function c57421866.filter(c) ...@@ -23,7 +23,7 @@ function c57421866.filter(c)
return c:IsFaceup() and c:GetLevel()>=5 return c:IsFaceup() and c:GetLevel()>=5
end end
function c57421866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c57421866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:GetLevel()>=5 end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57421866.filter(chkc) end
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return Duel.IsExistingTarget(c57421866.filter,tp,LOCATION_MZONE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c57421866.filter,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
......
...@@ -45,7 +45,7 @@ function c57774843.spfilter(c) ...@@ -45,7 +45,7 @@ function c57774843.spfilter(c)
end end
function c57774843.spcon(e,c) function c57774843.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(c57774843.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil) local g=Duel.GetMatchingGroup(c57774843.spfilter,c:GetControler(),LOCATION_GRAVE,0,nil)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
return ct>3 return ct>3
......
...@@ -15,7 +15,7 @@ function c58851034.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -15,7 +15,7 @@ function c58851034.condition(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) return re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev)
end end
function c58851034.cfilter(c) function c58851034.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end end
function c58851034.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c58851034.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c58851034.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c58851034.cfilter,tp,LOCATION_HAND,0,1,nil) end
......
...@@ -66,8 +66,8 @@ function c5973663.filter1(c) ...@@ -66,8 +66,8 @@ function c5973663.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT) return c:IsFaceup() and c:IsRace(RACE_PLANT)
end end
function c5973663.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c5973663.tg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_MZONE and c5973663.filter1(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c5973663.filter1(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500) Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500)
...@@ -115,8 +115,8 @@ function c5973663.filter3(c,e,tp) ...@@ -115,8 +115,8 @@ function c5973663.filter3(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c5973663.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c5973663.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c5973663.filter3(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c5973663.filter3(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c5973663.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c5973663.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c5973663.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c5973663.filter3,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
...@@ -124,7 +124,7 @@ function c5973663.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -124,7 +124,7 @@ function c5973663.tg3(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c5973663.op3(e,tp,eg,ep,ev,re,r,rp) function c5973663.op3(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE,0)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -27,7 +27,7 @@ function c6007213.initial_effect(c) ...@@ -27,7 +27,7 @@ function c6007213.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--destroy --destroy
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71413901,2)) e4:SetDescription(aux.Stringid(6007213,0))
e4:SetCategory(CATEGORY_DESTROY) e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
......
...@@ -5,7 +5,7 @@ function c60534585.initial_effect(c) ...@@ -5,7 +5,7 @@ function c60534585.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c60534585.condition) e1:SetCondition(c60534585.condition)
e1:SetCost(c60534585.target) e1:SetTarget(c60534585.target)
e1:SetOperation(c60534585.operation) e1:SetOperation(c60534585.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -24,7 +24,7 @@ end ...@@ -24,7 +24,7 @@ end
function c61011311.activate(e,tp,eg,ep,ev,re,r,rp) function c61011311.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:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENCE) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
......
...@@ -23,7 +23,7 @@ function c6276588.initial_effect(c) ...@@ -23,7 +23,7 @@ function c6276588.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(23297235,0)) e4:SetDescription(aux.Stringid(6276588,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
...@@ -53,8 +53,8 @@ function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,8 +53,8 @@ function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
local def=tc:GetTextDefence() local def=tc:GetTextDefence()
if c:IsFacedown() or atk<0 then atk=0 end if tc:IsFacedown() or atk<0 then atk=0 end
if c:IsFacedown() or def<0 then def=0 end if tc:IsFacedown() or def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(63519819,RESET_EVENT+0x1fe0000,0,0) tc:RegisterFlagEffect(63519819,RESET_EVENT+0x1fe0000,0,0)
......
...@@ -20,7 +20,7 @@ function c64034255.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c64034255.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c64034255.cfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c64034255.cfilter,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetFirst():IsAttribute(ATTRIBUTE_WIND) then e:SetLabel(1) else e:SetLabel(0) end if g:GetFirst():IsAttribute(ATTRIBUTE_WIND) then e:SetLabel(1) else e:SetLabel(0) end
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_COST)
end end
function c64034255.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c64034255.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
...@@ -39,10 +39,10 @@ function c64047146.initial_effect(c) ...@@ -39,10 +39,10 @@ function c64047146.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c64047146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c64047146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c64047146.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c64047146.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c64047146.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end end
function c64047146.operation(e,tp,eg,ep,ev,re,r,rp) function c64047146.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -19,8 +19,8 @@ function c64268668.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -19,8 +19,8 @@ function c64268668.atkcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetCurrentPhase()==PHASE_BATTLE
and (a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(64268668)) and ((a and a:IsControler(tp) and a:IsFaceup() and a:IsCode(64268668))
or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(64268668)) or (d and d:IsControler(tp) and d:IsFaceup() and d:IsCode(64268668)))
end end
function c64268668.atkcost(e,tp,eg,ep,ev,re,r,rp,chk) function c64268668.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
...@@ -47,8 +47,8 @@ function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,8 +47,8 @@ function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack() local atk=tc:GetTextAttack()
local def=tc:GetTextDefence() local def=tc:GetTextDefence()
if c:IsFacedown() or atk<0 then atk=0 end if tc:IsFacedown() or atk<0 then atk=0 end
if c:IsFacedown() or def<0 then def=0 end if tc:IsFacedown() or def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit --Add Equip limit
tc:RegisterFlagEffect(64631466,RESET_EVENT+0x1fe0000,0,0) tc:RegisterFlagEffect(64631466,RESET_EVENT+0x1fe0000,0,0)
......
...@@ -48,7 +48,7 @@ function c65079854.eqlimit(e,c) ...@@ -48,7 +48,7 @@ function c65079854.eqlimit(e,c)
return c:IsCode(73580471) or c:IsRace(RACE_PLANT) return c:IsCode(73580471) or c:IsRace(RACE_PLANT)
end end
function c65079854.filter(c,tp) function c65079854.filter(c,tp)
return c:IsFaceup() and c:IsCode(73580471) or c:IsRace(RACE_PLANT) return c:IsFaceup() and (c:IsCode(73580471) or c:IsRace(RACE_PLANT))
end end
function c65079854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c65079854.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c65079854.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c65079854.filter(chkc) end
......
...@@ -7,6 +7,7 @@ function c65810489.initial_effect(c) ...@@ -7,6 +7,7 @@ function c65810489.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE) e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c65810489.spcon) e1:SetCondition(c65810489.spcon)
e1:SetTarget(c65810489.sptg)
e1:SetOperation(c65810489.spop) e1:SetOperation(c65810489.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
...@@ -25,7 +25,7 @@ function c66625883.initial_effect(c) ...@@ -25,7 +25,7 @@ function c66625883.initial_effect(c)
--pos --pos
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(66625883,1)) e4:SetDescription(aux.Stringid(66625883,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH) e4:SetCategory(CATEGORY_POSITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_SUMMON_SUCCESS) e4:SetCode(EVENT_SUMMON_SUCCESS)
......
...@@ -20,7 +20,7 @@ function c66661678.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -20,7 +20,7 @@ function c66661678.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,tp,0)
end end
function c66661678.operation(e,tp,eg,ep,ev,re,r,rp) function c66661678.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0 if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,66661679,0,0x4011,1000,0,1,RACE_AQUA,ATTRIBUTE_WATER) then return end or not Duel.IsPlayerCanSpecialSummonMonster(tp,66661679,0,0x4011,1000,0,1,RACE_AQUA,ATTRIBUTE_WATER) then return end
local token=Duel.CreateToken(tp,66661679) local token=Duel.CreateToken(tp,66661679)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK) Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
......
...@@ -7,7 +7,7 @@ function c67038874.initial_effect(c) ...@@ -7,7 +7,7 @@ function c67038874.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c67038874.condition) e1:SetCondition(c67038874.condition)
e1:SetTarget(c67038874.target) e1:SetTarget(c67038874.target)
e1:SetOperation(c67038874.operation) e1:SetOperation(c67038874.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -25,15 +25,15 @@ function c67300516.filter(c,e,tp) ...@@ -25,15 +25,15 @@ function c67300516.filter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c67300516.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c67300516.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67300516.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c67300516.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(0,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67300516.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end and Duel.IsExistingTarget(c67300516.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c67300516.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp) local g=Duel.SelectTarget(tp,c67300516.filter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler(),e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end end
function c67300516.spop(e,tp,eg,ep,ev,re,r,rp) function c67300516.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(0,LOCATION_MZONE)==0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
...@@ -21,7 +21,7 @@ function c67464807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -21,7 +21,7 @@ function c67464807.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c67464807.filter(chkc) end if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c67464807.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c67464807.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c67464807.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c67464807.filte,tp,0,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c67464807.filter,tp,0,LOCATION_MZONE,1,1,nil)
end end
function c67464807.activate(e,tp,eg,ep,ev,re,r,rp) function c67464807.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -14,12 +14,12 @@ function c67630339.initial_effect(c) ...@@ -14,12 +14,12 @@ function c67630339.initial_effect(c)
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE) ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetCondition(c67630339.check) ge1:SetOperation(c67630339.check)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c) local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED) ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetCondition(c67630339.check2) ge2:SetOperation(c67630339.check2)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c) local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
...@@ -5,7 +5,7 @@ function c68191243.initial_effect(c) ...@@ -5,7 +5,7 @@ function c68191243.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c68191243.con) e1:SetCondition(c68191243.con)
e1:SetTarget(c68191243.tg) e1:SetTarget(c68191243.tg)
e1:SetOperation(c68191243.op) e1:SetOperation(c68191243.op)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -26,7 +26,7 @@ function c71645242.initial_effect(c) ...@@ -26,7 +26,7 @@ function c71645242.initial_effect(c)
--special summon --special summon
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71645242,1)) e4:SetDescription(aux.Stringid(71645242,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e4:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET) e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
...@@ -93,9 +93,9 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -93,9 +93,9 @@ function c71645242.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return e:GetHandler():IsDestructable(e) and g:GetCount()>0 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc) if chk==0 then return e:GetHandler():IsDestructable(e) and g:GetCount()>0 and (Duel.GetLocationCount(tp,LOCATION_MZONE)>-sc)
and Duel.IsExistingMatchingCard(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end and Duel.IsExistingMatchingCard(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp) local tg=Duel.SelectTarget(tp,c71645242.filter2,tp,LOCATION_GRAVE,0,1,1,nil,atk,e,tp)
e:SetLabel(atk) e:SetLabel(atk)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
g:AddCard(e:GetHandler()) g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
......
...@@ -80,7 +80,7 @@ function c72709014.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -80,7 +80,7 @@ function c72709014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(ec,REASON_COST) Duel.Release(ec,REASON_COST)
end end
function c72709014.spfilter(c,e,tp,code) function c72709014.spfilter(c,e,tp,code)
return (code==81383947 and c:IsCode(75917088)) or (code==46128076 and c:IsCode(2316186)) return ((code==81383947 and c:IsCode(75917088)) or (code==46128076 and c:IsCode(2316186)))
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end end
function c72709014.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c72709014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -28,7 +28,7 @@ end ...@@ -28,7 +28,7 @@ end
function c74848038.activate(e,tp,eg,ep,ev,re,r,rp) function c74848038.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,0,REASON_EFFECT) Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc) Duel.ConfirmCards(1-tp,tc)
end end
end end
...@@ -20,7 +20,7 @@ function c75433814.initial_effect(c) ...@@ -20,7 +20,7 @@ function c75433814.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1)
e2:SetCost(c75433814.descon) e2:SetCondition(c75433814.descon)
e2:SetTarget(c75433814.destg) e2:SetTarget(c75433814.destg)
e2:SetOperation(c75433814.desop) e2:SetOperation(c75433814.desop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -14,14 +14,14 @@ function c76384284.filter(c,e,tp) ...@@ -14,14 +14,14 @@ function c76384284.filter(c,e,tp)
return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) return c:IsSetCard(0x19) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
end end
function c76384284.target(e,tp,eg,ep,ev,re,r,rp,chk) function c76384284.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsExistingMatchingCard(c76384284.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c76384284.filter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.IsPlayerCanDraw(tp,1) end and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1) Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end end
function c76384284.activate(e,tp,eg,ep,ev,re,r,rp) function c76384284.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE)==0 then return end if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c76384284.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c76384284.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)~=0 then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function c77864539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c77864539.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c77864539.filter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c77864539.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c77864539.filter,tp,LOCATION_GRAVE,0,1,nil) if chk==0 then return Duel.IsExistingTarget(c77864539.filter,tp,LOCATION_GRAVE,0,1,nil)
and Duel.IsExistingTarget(Card.IsDestructable,tp,0,LOCATION_ONFIELD,1,nil) end and Duel.GetAttackTarget():IsDestructable() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
......
...@@ -22,5 +22,5 @@ end ...@@ -22,5 +22,5 @@ end
function c78613627.operation(e,tp,eg,ep,ev,re,r,rp) function c78613627.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end if not a:IsRelateToBattle() then return end
Duel.Destroy(a,nil,0,REASON_EFFECT) Duel.Destroy(a,REASON_EFFECT)
end end
...@@ -20,10 +20,10 @@ function c79205581.initial_effect(c) ...@@ -20,10 +20,10 @@ function c79205581.initial_effect(c)
end end
function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk) function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
if Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) if Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(79205581,1)) then and Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.SelectYesNo(tp,aux.Stringid(79205581,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
e:SetLabel(1) e:SetLabel(1)
else e:SetLabel(0) end else e:SetLabel(0) end
...@@ -38,9 +38,9 @@ function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp) ...@@ -38,9 +38,9 @@ function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE return Duel.GetCurrentPhase()==PHASE_BATTLE
end end
function c79205581.cost2(e,tp,eg,ep,ev,re,r,rp,chk) function c79205581.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGraveAsCost,tp,LOCATION_ONFIELD,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c79205581.operation2(e,tp,eg,ep,ev,re,r,rp) function c79205581.operation2(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -47,7 +47,7 @@ function c79229522.sprop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -47,7 +47,7 @@ function c79229522.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,0))
local g1=Duel.SelectMatchingCard(tp,c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp) local g1=Duel.SelectMatchingCard(tp,c79229522.spfilter1,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(79205581,1))
local g2=Duel.SelectMatchingCard(tp,c79229522.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,10,g1:GetFirst()) local g2=Duel.SelectMatchingCard(tp,c79229522.spfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,10,g1:GetFirst(),tp)
g1:Merge(g2) g1:Merge(g2)
Duel.SendtoGrave(g1,REASON_COST) Duel.SendtoGrave(g1,REASON_COST)
--spsummon condition --spsummon condition
......
...@@ -25,12 +25,12 @@ function c80651316.sfilter(c) ...@@ -25,12 +25,12 @@ function c80651316.sfilter(c)
end end
function c80651316.schtg(e,tp,eg,ep,ev,re,r,rp,chk) function c80651316.schtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c80651316.sfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c80651316.sfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c80651316.schop(e,tp,eg,ep,ev,re,r,rp) function c80651316.schop(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,c80651316.sfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c80651316.sfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount() then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
......
...@@ -56,10 +56,10 @@ function c81122844.thcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -56,10 +56,10 @@ function c81122844.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81122844.tgfilter,1,nil,e,tp) return eg:IsExists(c81122844.tgfilter,1,nil,e,tp)
end end
function c81122844.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81122844.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c81122844.tgfilter(chkc,e) end if chkc then return eg:IsContains(chkc) and c81122844.tgfilter(chkc,e,tp) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=eg:FilterSelect(tp,c81122844.tgfilter,1,1,nil,e) local g=eg:FilterSelect(tp,c81122844.tgfilter,1,1,nil,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
......
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c81336148.spcon(e,tp,eg,ep,ev,re,r,rp) function c81336148.spcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker() local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget() local d=Duel.GetAttackTarget()
return d and Duel.GetTurnPlayer()==tp and (d:IsRelateToBattle() or not d:IsReason(REASON_BATTLE)) return d and Duel.GetTurnPlayer()==tp and a:IsRace(RACE_WARRIOR) and (d:IsRelateToBattle() or not d:IsReason(REASON_BATTLE))
end end
function c81336148.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c81336148.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
......
...@@ -16,7 +16,7 @@ function c81661951.filter(c,e,tp) ...@@ -16,7 +16,7 @@ function c81661951.filter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsFaceup() and c:IsSetCard(0x29) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c81661951.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81661951.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:GetLocation(LOCATION_SZONE) and c81661951.filter(chkc,e,tp) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_SZONE) and c81661951.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c81661951.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end and Duel.IsExistingTarget(c81661951.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -20,10 +20,10 @@ function c81846636.filter(c) ...@@ -20,10 +20,10 @@ function c81846636.filter(c)
end end
function c81846636.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c81846636.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81846636.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c81846636.filter(chkc) end
if chk==0 then return true end if chk==0 then return Duel.IsExistingTarget(c81846636.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c81846636.filter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c81846636.filter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end end
function c81846636.operation(e,tp,eg,ep,ev,re,r,rp) function c81846636.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
......
...@@ -21,7 +21,7 @@ function c81866673.initial_effect(c) ...@@ -21,7 +21,7 @@ function c81866673.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80714121,1)) e3:SetDescription(aux.Stringid(81866673,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET) e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
......
...@@ -18,12 +18,12 @@ function c82670878.initial_effect(c) ...@@ -18,12 +18,12 @@ function c82670878.initial_effect(c)
local ge1=Effect.CreateEffect(c) local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE) ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetCondition(c82670878.check) ge1:SetOperation(c82670878.check)
Duel.RegisterEffect(ge1,0) Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c) local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED) ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetCondition(c82670878.check2) ge2:SetOperation(c82670878.check2)
Duel.RegisterEffect(ge2,0) Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c) local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
...@@ -88,7 +88,7 @@ function c82670878.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,7 +88,7 @@ function c82670878.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET) e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetTarget(c82670878.atlimit) e3:SetTarget(c82670878.atlimit)
e3:SetValue(1) e3:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
......
...@@ -6,7 +6,7 @@ function c82994509.initial_effect(c) ...@@ -6,7 +6,7 @@ function c82994509.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN) e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetTarget(c82994509.condition) e1:SetCondition(c82994509.condition)
e1:SetTarget(c82994509.target) e1:SetTarget(c82994509.target)
e1:SetOperation(c82994509.operation) e1:SetOperation(c82994509.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -24,7 +24,7 @@ function c83370323.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -24,7 +24,7 @@ function c83370323.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE) e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetOperation(c83370323.atkop) e1:SetOperation(c83370323.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+0x1fe0000)
sync:RegisterEffect(e1) sync:RegisterEffect(e1)
end end
function c83370323.atkop(e,tp,eg,ep,ev,re,r,rp) function c83370323.atkop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -12,7 +12,7 @@ function c83555666.initial_effect(c) ...@@ -12,7 +12,7 @@ function c83555666.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c83555666.filter(c) function c83555666.filter(c)
return c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83555666.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83555666.filter(chkc) end
...@@ -24,7 +24,7 @@ function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,7 +24,7 @@ function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c83555666.activate(e,tp,eg,ep,ev,re,r,rp) function c83555666.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack() local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)>0 then if Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
......
...@@ -12,7 +12,7 @@ function c83555667.initial_effect(c) ...@@ -12,7 +12,7 @@ function c83555667.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c83555667.filter(c) function c83555667.filter(c)
return c:IsDestructable() return c:IsFaceup() and c:IsDestructable()
end end
function c83555667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c83555667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83555667.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c83555667.filter(chkc) end
...@@ -24,7 +24,7 @@ function c83555667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -24,7 +24,7 @@ function c83555667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c83555667.activate(e,tp,eg,ep,ev,re,r,rp) function c83555667.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack() local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)>0 then if Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT) Duel.Damage(1-tp,atk,REASON_EFFECT)
......
...@@ -16,7 +16,7 @@ function c85028288.initial_effect(c) ...@@ -16,7 +16,7 @@ function c85028288.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--atkup --atkup
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80102359,0)) e3:SetDescription(aux.Stringid(85028288,0))
e3:SetCategory(CATEGORY_ATKCHANGE) e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
......
--ウォーター·ドラゴン --ウォーター·ドラゴン
function c85066822.initial_effect(c) function c85066822.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon --cannot special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
...@@ -16,7 +17,7 @@ function c85066822.initial_effect(c) ...@@ -16,7 +17,7 @@ function c85066822.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58071123,0)) e3:SetDescription(aux.Stringid(85066822,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
......
...@@ -13,7 +13,7 @@ function c85352446.initial_effect(c) ...@@ -13,7 +13,7 @@ function c85352446.initial_effect(c)
end end
function c85352446.filter(c) function c85352446.filter(c)
local lv=c:GetLevel() local lv=c:GetLevel()
return lv>0 and lv<=5 and c:IsFaceup() and Duel.IsExistingMatchingCard(c85352446.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c) return lv>0 and lv<=5 and c:IsFaceup() and Duel.IsExistingMatchingCard(c85352446.filter2,0,LOCATION_MZONE,LOCATION_MZONE,1,c,lv)
end end
function c85352446.filter2(c,lv) function c85352446.filter2(c,lv)
local clv=c:GetLevel() local clv=c:GetLevel()
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function c85431040.initial_effect(c) function c85431040.initial_effect(c)
--damage --damage
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(85431040.,0)) e1:SetDescription(aux.Stringid(85431040,0))
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
...@@ -12,26 +12,29 @@ function c85475641.initial_effect(c) ...@@ -12,26 +12,29 @@ function c85475641.initial_effect(c)
e1:SetOperation(c85475641.spop) e1:SetOperation(c85475641.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c85475641.filter(c,tp)
return c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c:GetLevel()>0
and c:IsControler(tp) and c:GetPreviousControler()==tp and c:GetCode()~=85475641
end
function c85475641.spcon(e,tp,eg,ep,ev,re,r,rp) function c85475641.spcon(e,tp,eg,ep,ev,re,r,rp)
local des=eg:GetFirst() return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and eg:IsExists(c85475641.filter,1,nil,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and des:IsLocation(LOCATION_GRAVE)
and des:GetLevel()>0 and des:IsReason(REASON_BATTLE) and des:GetControler()==tp
and des:GetPreviousControler()==tp and des:GetCode()~=85475641
end end
function c85475641.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c85475641.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
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
e:SetLabel(eg:Filter(c85475641.filter,nil,tp):GetFirst():GetLevel())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c85475641.spop(e,tp,eg,ep,ev,re,r,rp) function c85475641.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 or not c:IsRelateToEffect(e) then return end if Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)~=0 or not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(eg:GetFirst():GetLevel()) e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1fe0000) e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1) c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end end
...@@ -17,7 +17,7 @@ function c86170989.filter2(c,e,tp) ...@@ -17,7 +17,7 @@ function c86170989.filter2(c,e,tp)
end end
function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then if chk==0 then
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86170989.filter2(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c86170989.filter2(chkc,e,tp) end
return e:GetHandler():IsRelateToBattle() return e:GetHandler():IsRelateToBattle()
end end
local op=0 local op=0
...@@ -61,7 +61,7 @@ function c86170989.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -61,7 +61,7 @@ function c86170989.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86170989.filter1,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c86170989.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT) Duel.SendtoGrave(g,REASON_EFFECT)
end end
end end
end end
...@@ -12,7 +12,7 @@ function c87319876.initial_effect(c) ...@@ -12,7 +12,7 @@ function c87319876.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL) e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTarget(c87319876.ccon) e2:SetCondition(c87319876.ccon)
e2:SetOperation(c87319876.cop) e2:SetOperation(c87319876.cop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -18,6 +18,7 @@ function c88559132.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -18,6 +18,7 @@ function c88559132.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_WARRIOR) local g=Duel.SelectReleaseGroup(c:GetControler(),Card.IsRace,1,1,nil,RACE_WARRIOR)
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
local atk=g:GetFirst():GetBaseAttack() local atk=g:GetFirst():GetBaseAttack()
if atk<0 then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -11,7 +11,7 @@ function c88958576.initial_effect(c) ...@@ -11,7 +11,7 @@ function c88958576.initial_effect(c)
end end
function c88958576.spcon(e,c) function c88958576.spcon(e,c)
if c==nil then return true end if c==nil then return true end
if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)==0 then return false end if Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)<=0 then return false end
local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39) local g=Duel.GetMatchingGroup(Card.IsSetCard,c:GetControler(),LOCATION_GRAVE,0,nil,0x39)
local ct=g:GetClassCount(Card.GetCode) local ct=g:GetClassCount(Card.GetCode)
return ct>=3 return ct>=3
......
...@@ -17,16 +17,17 @@ end ...@@ -17,16 +17,17 @@ end
function c89235196.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c89235196.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c89235196.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c89235196.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.ConfirmCards(1-tp,e:GetHandler()) Duel.ConfirmCards(1-tp,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c89235196.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c89235196.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_EFFECT) Duel.SendtoGrave(g,REASON_COST)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c89235196.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c89235196.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end end
function c89235196.spop(e,tp,eg,ep,ev,re,r,rp,c) function c89235196.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end if not c:IsRelateToEffect(e) or not c:IsCanBeSpecialSummoned(e,0,tp,false,false) then return end
......
...@@ -33,7 +33,7 @@ function c91580102.initial_effect(c) ...@@ -33,7 +33,7 @@ function c91580102.initial_effect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e5:SetCode(EVENT_TO_GRAVE) e5:SetCode(EVENT_TO_GRAVE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET) e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetTarget(c91580102.atkcon) e5:SetCondition(c91580102.atkcon)
e5:SetTarget(c91580102.atktg) e5:SetTarget(c91580102.atktg)
e5:SetOperation(c91580102.atkop) e5:SetOperation(c91580102.atkop)
c:RegisterEffect(e5) c:RegisterEffect(e5)
......
...@@ -10,7 +10,7 @@ function c92065772.initial_effect(c) ...@@ -10,7 +10,7 @@ function c92065772.initial_effect(c)
end end
function c92065772.operation(e,tp,eg,ep,ev,re,r,rp) function c92065772.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
and Duel.GetLocationCount(1-tp,LOCATION_MZONE) then return end and Duel.GetLocationCount(1-tp,LOCATION_MZONE)<=0 then return end
--disable field --disable field
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -7,11 +7,11 @@ function c92933195.initial_effect(c) ...@@ -7,11 +7,11 @@ function c92933195.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCost(c92933195.handcon) e1:SetCondition(c92933195.handcon)
e1:SetOperation(c92933195.handop) e1:SetOperation(c92933195.handop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c92933195.handcon(e,tp,eg,ep,ev,re,r,rp,chk) function c92933195.handcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=5 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=5 return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>=5 and Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>=5
end end
function c92933195.handop(e,tp,eg,ep,ev,re,r,rp) function c92933195.handop(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -31,7 +31,10 @@ function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -31,7 +31,10 @@ function c94331452.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94331452.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c94331452.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c94331452.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,562)
local rc=Duel.AnnounceAttribute(tp,1,0xffff)
e:SetLabel(rc)
end end
function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c94331452.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94331452.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c94331452.filter(chkc) end
......
...@@ -18,7 +18,7 @@ function c95194279.filter(c,e,tp) ...@@ -18,7 +18,7 @@ function c95194279.filter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95194279.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95194279.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsCOntroler(tp) and c95194279.filter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c95194279.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c95194279.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end and Duel.IsExistingTarget(c95194279.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
...@@ -27,7 +27,7 @@ function c95526884.reccon(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function c95526884.reccon(e,tp,eg,ep,ev,re,r,rp)
if not d then return false end if not d then return false end
local m=a:GetAttack()-d:GetDefence() local m=a:GetAttack()-d:GetDefence()
e:SetLabel(m) e:SetLabel(m)
return c==a and m>0 and bit.band(d:GetBattlePosition(),POS_DEFENCE)~=0 return c==a and d:GetDefence()>=0 and m>0 and bit.band(d:GetBattlePosition(),POS_DEFENCE)~=0
end end
function c95526884.rectg(e,tp,eg,ep,ev,re,r,rp,chk) function c95526884.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--バックアップ·ウォリアー --バックアップ·ウォリアー
function c95637655.initial_effect(c) function c95637655.initial_effect(c)
c:EnableReviveLimit()
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
......
...@@ -36,11 +36,11 @@ end ...@@ -36,11 +36,11 @@ end
function c95750695.eqlimit(e,c) function c95750695.eqlimit(e,c)
return c:IsType(TYPE_DUAL) return c:IsType(TYPE_DUAL)
end end
function c95750695.filter(c,tp) function c95750695.filter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) return c:IsFaceup() and c:IsType(TYPE_DUAL)
end end
function c95750695.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95750695.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c95750695.filter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and c95750695.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,c95750695.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
...@@ -61,7 +61,7 @@ function c95750695.spfilter(c,e,tp) ...@@ -61,7 +61,7 @@ function c95750695.spfilter(c,e,tp)
return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsType(TYPE_NORMAL) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c95750695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c95750695.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c95750695.spfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c95750695.spfilter(chkc,e,tp) end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c95750695.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp) local g=Duel.SelectTarget(tp,c95750695.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
......
...@@ -14,7 +14,7 @@ function c97151365.initial_effect(c) ...@@ -14,7 +14,7 @@ function c97151365.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(18235577,0)) e3:SetDescription(aux.Stringid(97151365,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON) e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
......
...@@ -6,7 +6,7 @@ function c9780364.initial_effect(c) ...@@ -6,7 +6,7 @@ function c9780364.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c9780364.condition) e1:SetCondition(c9780364.condition)
e1:SetTarget(c9780364.target) e1:SetTarget(c9780364.target)
e1:SetOperation(c9780364.activate) e1:SetOperation(c9780364.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
......
...@@ -12,7 +12,7 @@ function c97922283.initial_effect(c) ...@@ -12,7 +12,7 @@ function c97922283.initial_effect(c)
e2:SetCode(EVENT_BATTLE_DESTROYING) e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c97922283.condition) e2:SetCondition(c97922283.condition)
e2:SetCost(c97922283.target) e2:SetTarget(c97922283.target)
e2:SetOperation(c97922283.operation) e2:SetOperation(c97922283.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
......
...@@ -19,7 +19,7 @@ function c97970833.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -19,7 +19,7 @@ function c97970833.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,1,nil,tp) end
end end
function c97970833.activate(e,tp,eg,ep,ev,re,r,rp) function c97970833.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,nil) local tc=Duel.GetFirstMatchingCard(c97970833.filter,tp,LOCATION_DECK,0,nil,tp)
if tc then if tc then
if Duel.GetFieldCard(tp,LOCATION_SZONE,5)~=nil then if Duel.GetFieldCard(tp,LOCATION_SZONE,5)~=nil then
Duel.Destroy(Duel.GetFieldCard(tp,LOCATION_SZONE,5),REASON_RULE) Duel.Destroy(Duel.GetFieldCard(tp,LOCATION_SZONE,5),REASON_RULE)
......
...@@ -13,7 +13,7 @@ end ...@@ -13,7 +13,7 @@ end
function c98336111.condtion(e) function c98336111.condtion(e)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttackTarget()~=nil return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and Duel.GetAttackTarget()~=nil
and (Duel.GetAttacker()==e:GetHandler()) or (Duel.GetAttackTarget()==e:GetHandler()) and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler())
end end
function c98336111.target(e,c) function c98336111.target(e,c)
return c==e:GetHandler():GetBattleTarget() and c:IsType(TYPE_FUSION) return c==e:GetHandler():GetBattleTarget() and c:IsType(TYPE_FUSION)
......
...@@ -6,7 +6,7 @@ function c98558751.initial_effect(c) ...@@ -6,7 +6,7 @@ function c98558751.initial_effect(c)
--destroy --destroy
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(98558751,0)) e1:SetDescription(aux.Stringid(98558751,0))
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
......
...@@ -5,10 +5,14 @@ function c99214782.initial_effect(c) ...@@ -5,10 +5,14 @@ function c99214782.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER) e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c99214782.condition)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE) e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c99214782.target) e1:SetTarget(c99214782.target)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c99214782.condition(e)
return e:GetHandler():IsAttackPos()
end
function c99214782.target(e,c) function c99214782.target(e,c)
return c:GetLevel()>=5 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0 return c:GetLevel()>=5 and bit.band(c:GetSummonType(),SUMMON_TYPE_SPECIAL)~=0
end end
...@@ -406,6 +406,6 @@ ...@@ -406,6 +406,6 @@
!counter 0x24 弦指示物 !counter 0x24 弦指示物
!counter 0x25 年代记指示物 !counter 0x25 年代记指示物
!counter 0x26 指示物(金属射手) !counter 0x26 指示物(金属射手)
!counter 0x26 指示物(死亡蚊) !counter 0x27 指示物(死亡蚊)
!counter 0x3027 指示物(暗黑投射手) !counter 0x3027 指示物(暗黑投射手)
!counter 0x28 指示物(气球蜥蜴) !counter 0x28 指示物(气球蜥蜴)
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