Commit c8882e2d authored by VanillaSalt's avatar VanillaSalt

fix script

parent 451740fe
......@@ -9,7 +9,7 @@ function c11159464.initial_effect(c)
c:RegisterEffect(e1)
--discard
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:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c11159464.tgcon)
......
......@@ -16,7 +16,7 @@ function c12423762.initial_effect(c)
e2:SetDescription(aux.Stringid(12423762,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BE_BATTLE_TARGET)
e2:SetTarget(c12423762.indcost)
e2:SetCost(c12423762.indcost)
e2:SetOperation(c12423762.indop)
c:RegisterEffect(e2)
end
......
......@@ -26,10 +26,10 @@ function c13002461.filter(c)
return c:IsFaceup() and c:IsRace(RACE_SPELLCASTER) and c:IsLevelAbove(1)
end
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 chk==0 then return Duel.IsExistingTarget(c13002461.filter,tp,LOCATION_MZONE,0,1,nil) 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,LOCATION_MZONE,1,nil) end
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
function c13002461.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
......
......@@ -18,7 +18,7 @@ function c13250922.initial_effect(c)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(83021423,0))
e3:SetDescription(aux.Stringid(13250922,0))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
......
......@@ -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)
end
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)
local g=Duel.SelectMatchingCard(tp,c135598.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -21,5 +21,5 @@ end
function c13945283.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.SendtoHand(a,nil,0,REASON_EFFECT)
Duel.SendtoHand(a,nil,REASON_EFFECT)
end
......@@ -11,15 +11,15 @@ function c13955608.initial_effect(c)
end
function c13955608.target(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
function c13955608.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
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
c:AddTrapMonsterAttribute(true,ATTRIBUTE_EARTH,RACE_ROCK,4,0,2000)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,13955608,0,0x21,0,2000,4,RACE_MACHINE,ATTRIBUTE_EARTH) then return end
c:AddTrapMonsterAttribute(true,ATTRIBUTE_EARTH,RACE_MACHINE,4,0,2000)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
c:TrapMonsterBlock()
--cannot attack
......
......@@ -29,10 +29,10 @@ end
function c14154221.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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)
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)
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
function c14154221.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
......
......@@ -52,12 +52,12 @@ function c16197610.spfilter(c,e,tp)
and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
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)
local g=Duel.SelectMatchingCard(tp,c16197610.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()~=0 then
......
......@@ -15,6 +15,9 @@ function c16550875.initial_effect(c)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(800)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e3)
--Equip limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -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)
end
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)
local g=Duel.SelectMatchingCard(tp,c16796157.filter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -14,7 +14,7 @@ function c16825874.initial_effect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetTarget(c16825874.ccon)
e2:SetCondition(c16825874.ccon)
e2:SetOperation(c16825874.cop)
c:RegisterEffect(e2)
end
......
......@@ -6,7 +6,7 @@ function c16828633.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c16828633.condition)
e1:SetCondition(c16828633.condition)
e1:SetOperation(c16828633.operation)
c:RegisterEffect(e1)
end
......
......@@ -4,8 +4,8 @@ function c17985575.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c17985575.etarget)
e1:SetValue(1)
c:RegisterEffect(e1)
......
......@@ -35,7 +35,7 @@ function c18060565.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eq=Duel.SelectMatchingCard(tp,c18060565.eqfilter,tp,LOCATION_DECK,0,1,1,nil)
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())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......
......@@ -69,7 +69,7 @@ function c18096222.dafilter(c)
return c:IsFaceup() and c:IsType(TYPE_DUAL) and not c:IsDualState()
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
Duel.SelectTarget(tp,c18096222.dafilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
......
......@@ -17,7 +17,7 @@ function c18158397.initial_effect(c)
c:RegisterEffect(e2)
end
function c18158397.cfilter(c,tp)
return c:IsControler(tp) and c:GetPreviousControler(tp)
return c:IsControler(tp) and c:GetPreviousControler()==tp
end
function c18158397.condition(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,0x41)==0x41 and re and re:GetHandler():IsSetCard(0x18)
......
......@@ -23,7 +23,7 @@ end
function c20188127.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
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)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
......
......@@ -4,6 +4,7 @@ function c20529766.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c20529766.condition)
e1:SetOperation(c20529766.operation)
c:RegisterEffect(e1)
--tribute check
......
......@@ -4,7 +4,7 @@ function c20858318.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c20858318.con)
e1:SetCondition(c20858318.con)
e1:SetOperation(c20858318.op)
c:RegisterEffect(e1)
end
......
......@@ -67,7 +67,7 @@ function c21977828.spfilter(c,e,tp)
return c:IsSetCard(0x56) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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
and Duel.IsExistingTarget(c21977828.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEDOWN)
Duel.SelectTarget(tp,c27340877.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,1-tp,563)
local rc=Duel.AnnounceRace(1-tp,2,0xffffff)
Duel.Hint(HINT_SELECTMSG,1-tp,562)
local rc=Duel.AnnounceAttribute(1-tp,2,0xffffff)
e:SetLabel(rc)
end
function c27340877.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFacedown() then
Duel.ConfirmCards(1-tp,tc)
if tc:IsRace(e:GetLabel()) then
if tc:IsAttribute(e:GetLabel()) then
Duel.Draw(1-tp,2,REASON_EFFECT)
else
Duel.Draw(tp,2,REASON_EFFECT)
......
......@@ -18,13 +18,11 @@ function c27655513.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToGrave()
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,2,tp,LOCATION_DECK)
end
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)
local sg=g:Select(tp,2,2,nil)
Duel.SendtoGrave(sg,REASON_EFFECT)
local g=Duel.SelectMatchingCard(tp,c27655513.filter,tp,LOCATION_DECK,0,2,2,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
......@@ -19,14 +19,14 @@ function c27821104.filter(c,e,tp)
end
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 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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
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)
end
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()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -66,8 +66,8 @@ function c27970830.filter1(c)
return c:IsFaceup() and (c:IsSetCard(0x3d) or c:IsSetCard(0x20)) and c:IsType(TYPE_EFFECT)
end
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 chk==0 then return Duel.IsExistingMatchingCard(c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c27970830.filter1(chkc) 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)
local g=Duel.SelectTarget(tp,c27970830.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500)
......@@ -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)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
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
and Duel.IsExistingTarget(c27970830.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
end
function c27970830.op3(e,tp,eg,ep,ev,re,r,rp)
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()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -24,7 +24,7 @@ function c30126992.initial_effect(c)
end
function c30126992.spcon(e,c)
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 ct=g:GetClassCount(Card.GetCode)
return ct>4
......
......@@ -5,7 +5,7 @@ function c31000575.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c31000575.target)
e1:SetTarget(c31000575.target)
e1:SetOperation(c31000575.operation)
c:RegisterEffect(e1)
end
......
......@@ -18,13 +18,12 @@ function c31328739.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end
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
local ht=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
Duel.SetTargetPlayer(1-tp)
end
function c31328739.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
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.ShuffleDeck(p)
Duel.BreakEffect()
......
......@@ -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 chk==0 then return Duel.IsExistingTarget(c31826057.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
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
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
......
......@@ -12,6 +12,9 @@ function c3366982.initial_effect(c)
end
c3366982.material_count=2
c3366982.material={88819587,64428736}
function c3366982.filter(c)
return c:IsFaceup() and c:IsAttribute(0xf8)
end
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
......@@ -25,7 +25,7 @@ end
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 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
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local tc=g:Select(1-tp,1,1,nil):GetFirst()
......
......@@ -12,7 +12,7 @@ function c34149830.initial_effect(c)
e2:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c34149830.condition)
e2:SetCost(c34149830.target)
e2:SetTarget(c34149830.target)
e2:SetOperation(c34149830.operation)
c:RegisterEffect(e2)
end
......
......@@ -16,7 +16,7 @@ function c35149085.filter(c)
end
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 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)
local g=Duel.SelectTarget(tp,c35149085.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
......
......@@ -26,7 +26,7 @@ function c35798491.mtop(e,tp,eg,ep,ev,re,r,rp)
end
end
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
function c35798491.disop(e,tp,eg,ep,ev,re,r,rp)
if ep==tp then return end
......
......@@ -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)
end
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
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
......
......@@ -25,7 +25,7 @@ function c38742075.initial_effect(c)
c:RegisterEffect(e3)
end
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
function c38742075.distg(e,c)
return c:GetCardTargetCount()>0 and c:IsType(TYPE_SPELL)
......
......@@ -32,7 +32,7 @@ end
function c40189917.sumcon(e,c)
if c==nil then return true end
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
function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
......
......@@ -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)
if g:GetCount()==0 then return end
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)
local sg=Duel.SelectMatchingCard(tp,c4081825.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=sg:GetFirst()
......
......@@ -34,12 +34,10 @@ function c42280216.filter(c,e,tp)
return (code==78275321 or code==78552773) and c:IsAbleToHand()
end
function c42280216.shtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c42280216.filter,tp,LOCATION_DECK,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c42280216.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
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)
local g=Duel.SelectMatchingCard(tp,c42280216.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
......
......@@ -10,7 +10,7 @@ function c44505297.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetTarget(c44505297.eqcon)
e1:SetCondition(c44505297.eqcon)
e1:SetTarget(c44505297.eqtg)
e1:SetOperation(c44505297.eqop)
c:RegisterEffect(e1)
......
......@@ -15,7 +15,7 @@ function c44635489.initial_effect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c44635489.lvtg)
e2:SetTarget(c44635489.lvtg)
e2:SetOperation(c44635489.lvop)
c:RegisterEffect(e2)
--xyzlimit
......@@ -38,7 +38,7 @@ function c44635489.filter(c,clv)
and ((c:IsLocation(LOCATION_MZONE) and c:IsFaceup()) or c:IsLocation(LOCATION_GRAVE))
end
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
Duel.SelectTarget(tp,c44635489.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,1,1,e:GetHandler(),e:GetHandler():GetLevel())
end
......
......@@ -19,11 +19,11 @@ function c44689688.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function c44689688.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
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)
end
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
local token=Duel.CreateToken(tp,44689689)
Duel.SpecialSummon(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
......
......@@ -7,7 +7,7 @@ function c44792253.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_REMOVE)
e1:SetCondition(c44792253.descon)
e1:SetCost(c44792253.destg)
e1:SetTarget(c44792253.destg)
e1:SetOperation(c44792253.desop)
c:RegisterEffect(e1)
end
......
......@@ -11,6 +11,6 @@ function c45439263.initial_effect(c)
end
function c45439263.spcon(e,c)
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
end
......@@ -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)
end
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
function c46384403.operation(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
......
......@@ -32,7 +32,7 @@ function c4722253.initial_effect(c)
end
function c4722253.spcon(e,c)
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 ct=g:GetClassCount(Card.GetCode)
return ct>4
......
......@@ -46,12 +46,12 @@ function c47436247.filter(c,ct,e,tp)
and c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
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()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetCondition(c50263751.condition)
e2:SetOperation(c50263751.operation)
c:RegisterEffect(e2)
end
......
......@@ -68,7 +68,7 @@ function c5128859.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Group.CreateGroup()
local tc=nil
for i=1,2 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
if ft<=0 then
tc=g1:FilterSelect(tp,Card.IsLocation,1,1,nil,LOCATION_MZONE):GetFirst()
else
......
......@@ -8,7 +8,7 @@ function c53162898.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCondition(c53162898.condition)
e1:SetCost(c53162898.target)
e1:SetTarget(c53162898.target)
e1:SetOperation(c53162898.operation)
c:RegisterEffect(e1)
end
......
......@@ -19,8 +19,8 @@ function c54326448.filter(c)
return c:IsFaceup() and c:IsSetCard(0x2c)
end
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
local g=Duel.SelectMatchingCard(tp,c54326448.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c54326448.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c54326448.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
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)
else return bit.band(c:GetPreviousPosition(),POS_FACEUP)~=0 end
end
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.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -23,7 +23,7 @@ function c57421866.filter(c)
return c:IsFaceup() and c:GetLevel()>=5
end
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()
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
......
......@@ -45,7 +45,7 @@ function c57774843.spfilter(c)
end
function c57774843.spcon(e,c)
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 ct=g:GetClassCount(Card.GetCode)
return ct>3
......
......@@ -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)
end
function c58851034.cfilter(c)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost()
return c:IsType(TYPE_SPELL) and c:IsDiscardable()
end
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
......
......@@ -66,8 +66,8 @@ function c5973663.filter1(c)
return c:IsFaceup() and c:IsRace(RACE_PLANT)
end
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 chk==0 then return Duel.IsExistingMatchingCard(c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c5973663.filter1(chkc) 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)
local g=Duel.SelectTarget(tp,c5973663.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_ATKCHANGE,g,1,0,500)
......@@ -115,8 +115,8 @@ function c5973663.filter3(c,e,tp)
return c:IsRace(RACE_PLANT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,0)>0
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
and Duel.IsExistingTarget(c5973663.filter3,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
end
function c5973663.op3(e,tp,eg,ep,ev,re,r,rp)
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()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -27,7 +27,7 @@ function c6007213.initial_effect(c)
c:RegisterEffect(e3)
--destroy
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(71413901,2))
e4:SetDescription(aux.Stringid(6007213,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
......
......@@ -5,7 +5,7 @@ function c60534585.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c60534585.condition)
e1:SetCost(c60534585.target)
e1:SetTarget(c60534585.target)
e1:SetOperation(c60534585.operation)
c:RegisterEffect(e1)
end
......
......@@ -24,7 +24,7 @@ end
function c61011311.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
......
......@@ -23,7 +23,7 @@ function c6276588.initial_effect(c)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(23297235,0))
e4:SetDescription(aux.Stringid(6276588,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -53,8 +53,8 @@ function c63519819.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefence()
if c:IsFacedown() or atk<0 then atk=0 end
if c:IsFacedown() or def<0 then def=0 end
if tc:IsFacedown() or atk<0 then atk=0 end
if tc:IsFacedown() or def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(63519819,RESET_EVENT+0x1fe0000,0,0)
......
......@@ -20,7 +20,7 @@ function c64034255.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
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
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.SendtoHand(g,nil,REASON_COST)
end
function c64034255.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
......
......@@ -39,10 +39,10 @@ function c64047146.initial_effect(c)
c:RegisterEffect(e5)
end
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 chk==0 then return Duel.IsExistingTarget(c64047146.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() 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.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)
end
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)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return Duel.GetCurrentPhase()==PHASE_BATTLE
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))
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)))
end
function c64268668.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
......
......@@ -47,8 +47,8 @@ function c64631466.eqop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefence()
if c:IsFacedown() or atk<0 then atk=0 end
if c:IsFacedown() or def<0 then def=0 end
if tc:IsFacedown() or atk<0 then atk=0 end
if tc:IsFacedown() or def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end
--Add Equip limit
tc:RegisterFlagEffect(64631466,RESET_EVENT+0x1fe0000,0,0)
......
......@@ -48,7 +48,7 @@ function c65079854.eqlimit(e,c)
return c:IsCode(73580471) or c:IsRace(RACE_PLANT)
end
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
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
......
......@@ -7,6 +7,7 @@ function c65810489.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c65810489.spcon)
e1:SetTarget(c65810489.sptg)
e1:SetOperation(c65810489.spop)
c:RegisterEffect(e1)
end
......
......@@ -25,7 +25,7 @@ function c66625883.initial_effect(c)
--pos
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(66625883,1))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetCategory(CATEGORY_POSITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_SUMMON_SUCCESS)
......
......@@ -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)
end
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
local token=Duel.CreateToken(tp,66661679)
Duel.SpecialSummonStep(token,0,tp,1-tp,false,false,POS_FACEUP_ATTACK)
......
......@@ -7,7 +7,7 @@ function c67038874.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_GRAVE)
e1:SetCost(c67038874.condition)
e1:SetCondition(c67038874.condition)
e1:SetTarget(c67038874.target)
e1:SetOperation(c67038874.operation)
c:RegisterEffect(e1)
......
......@@ -25,15 +25,15 @@ function c67300516.filter(c,e,tp)
return c:IsSetCard(0x3b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
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 chk==0 then return Duel.GetLocationCount(0,LOCATION_MZONE)>0
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(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c67300516.filter,tp,LOCATION_GRAVE,0,1,e:GetHandler(),e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
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)
end
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()
if tc and tc:IsRelateToEffect(e) then
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)
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
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
function c67464807.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -14,12 +14,12 @@ function c67630339.initial_effect(c)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetCondition(c67630339.check)
ge1:SetOperation(c67630339.check)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetCondition(c67630339.check2)
ge2:SetOperation(c67630339.check2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......
......@@ -5,7 +5,7 @@ function c68191243.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c68191243.con)
e1:SetCondition(c68191243.con)
e1:SetTarget(c68191243.tg)
e1:SetOperation(c68191243.op)
c:RegisterEffect(e1)
......
......@@ -26,7 +26,7 @@ function c71645242.initial_effect(c)
--special summon
local e4=Effect.CreateEffect(c)
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:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_SZONE)
......@@ -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)
and Duel.IsExistingMatchingCard(c71645242.filter2,tp,LOCATION_GRAVE,0,1,nil,atk,e,tp) end
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)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
g:AddCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -80,7 +80,7 @@ function c72709014.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(ec,REASON_COST)
end
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)
end
function c72709014.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,7 +28,7 @@ end
function c74848038.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
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)
end
end
......@@ -20,7 +20,7 @@ function c75433814.initial_effect(c)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c75433814.descon)
e2:SetCondition(c75433814.descon)
e2:SetTarget(c75433814.destg)
e2:SetOperation(c75433814.desop)
c:RegisterEffect(e2)
......
......@@ -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)
end
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.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
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)
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
......
......@@ -21,7 +21,7 @@ end
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 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)
local g=Duel.SelectTarget(tp,c77864539.filter,tp,LOCATION_GRAVE,0,1,1,nil)
local d=Duel.GetAttackTarget()
......
......@@ -22,5 +22,5 @@ end
function c78613627.operation(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
if not a:IsRelateToBattle() then return end
Duel.Destroy(a,nil,0,REASON_EFFECT)
Duel.Destroy(a,REASON_EFFECT)
end
......@@ -20,10 +20,10 @@ function c79205581.initial_effect(c)
end
function c79205581.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
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
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)
e:SetLabel(1)
else e:SetLabel(0) end
......@@ -38,9 +38,9 @@ function c79205581.condition2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE
end
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)
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)
end
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)
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)
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)
Duel.SendtoGrave(g1,REASON_COST)
--spsummon condition
......
......@@ -25,12 +25,12 @@ function c80651316.sfilter(c)
end
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
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c80651316.schop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
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.ConfirmCards(1-tp,g)
end
......
......@@ -56,10 +56,10 @@ function c81122844.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c81122844.tgfilter,1,nil,e,tp)
end
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
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.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
......
......@@ -20,7 +20,7 @@ end
function c81336148.spcon(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
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
function c81336148.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -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)
end
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
and Duel.IsExistingTarget(c81661951.filter,tp,LOCATION_SZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -20,10 +20,10 @@ function c81846636.filter(c)
end
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 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)
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
function c81846636.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
......
......@@ -21,7 +21,7 @@ function c81866673.initial_effect(c)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80714121,1))
e3:SetDescription(aux.Stringid(81866673,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
......
......@@ -18,12 +18,12 @@ function c82670878.initial_effect(c)
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_ATTACK_ANNOUNCE)
ge1:SetCondition(c82670878.check)
ge1:SetOperation(c82670878.check)
Duel.RegisterEffect(ge1,0)
local ge2=Effect.CreateEffect(c)
ge2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge2:SetCode(EVENT_ATTACK_DISABLED)
ge2:SetCondition(c82670878.check2)
ge2:SetOperation(c82670878.check2)
Duel.RegisterEffect(ge2,0)
local ge3=Effect.CreateEffect(c)
ge3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
......@@ -88,7 +88,7 @@ function c82670878.operation(e,tp,eg,ep,ev,re,r,rp)
e3:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e3:SetTarget(c82670878.atlimit)
e3:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e3:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e3)
end
Duel.SpecialSummonComplete()
......
......@@ -6,7 +6,7 @@ function c82994509.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetTarget(c82994509.condition)
e1:SetCondition(c82994509.condition)
e1:SetTarget(c82994509.target)
e1:SetOperation(c82994509.operation)
c:RegisterEffect(e1)
......
......@@ -24,7 +24,7 @@ function c83370323.op(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetOperation(c83370323.atkop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000)
sync:RegisterEffect(e1)
end
function c83370323.atkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -12,7 +12,7 @@ function c83555666.initial_effect(c)
c:RegisterEffect(e1)
end
function c83555666.filter(c)
return c:IsDestructable()
return c:IsFaceup() and c:IsDestructable()
end
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
......@@ -24,7 +24,7 @@ function c83555666.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c83555666.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
......
......@@ -12,7 +12,7 @@ function c83555667.initial_effect(c)
c:RegisterEffect(e1)
end
function c83555667.filter(c)
return c:IsDestructable()
return c:IsFaceup() and c:IsDestructable()
end
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
......@@ -24,7 +24,7 @@ function c83555667.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c83555667.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local atk=tc:GetAttack()
if Duel.Destroy(tc,REASON_EFFECT)>0 then
Duel.Damage(1-tp,atk,REASON_EFFECT)
......
......@@ -16,7 +16,7 @@ function c85028288.initial_effect(c)
c:RegisterEffect(e2)
--atkup
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(80102359,0))
e3:SetDescription(aux.Stringid(85028288,0))
e3:SetCategory(CATEGORY_ATKCHANGE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
......
--ウォーター·ドラゴン
function c85066822.initial_effect(c)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
......@@ -16,7 +17,7 @@ function c85066822.initial_effect(c)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(58071123,0))
e3:SetDescription(aux.Stringid(85066822,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
......
......@@ -13,7 +13,7 @@ function c85352446.initial_effect(c)
end
function c85352446.filter(c)
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
function c85352446.filter2(c,lv)
local clv=c:GetLevel()
......
......@@ -2,7 +2,7 @@
function c85431040.initial_effect(c)
--damage
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:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
......
......@@ -12,26 +12,29 @@ function c85475641.initial_effect(c)
e1:SetOperation(c85475641.spop)
c:RegisterEffect(e1)
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)
local des=eg:GetFirst()
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
return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==0 and eg:IsExists(c85475641.filter,1,nil,tp)
end
function c85475641.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
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)
end
function c85475641.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
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
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)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(eg:GetFirst():GetLevel())
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
Duel.SpecialSummonComplete()
end
......@@ -17,7 +17,7 @@ function c86170989.filter2(c,e,tp)
end
function c86170989.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
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()
end
local op=0
......@@ -61,7 +61,7 @@ function c86170989.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c86170989.filter1,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,nil,REASON_EFFECT)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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