Commit 6ea311d7 authored by 聖園ミカ's avatar 聖園ミカ 🐟

wocaonima

parent a22e1c66
Pipeline #25627 passed with stages
in 28 minutes and 28 seconds
No preview for this file type
......@@ -33,8 +33,8 @@ function cm.cfilter(c,tp)
return c:IsRace(RACE_FAIRY) and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -50,9 +50,9 @@ function cm.spfilter(c,e,tp,code)
return scorp.check_set_hana(c) and c:IsLevelAbove(5) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,e,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,e,tp)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
end
......
......@@ -31,19 +31,6 @@ function cm.initial_effect(c)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,m+900)
e2:SetCondition(cm.rscon)
--spsummon bgm
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetCondition(cm.sumcon)
e3:SetOperation(cm.sumsuc)
c:RegisterEffect(e3)
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function cm.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,2))
end
function cm.sssfilter(c)
return c:GetType()==0x82
......
......@@ -86,7 +86,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.descfilter,1,c,c,tp)
return Duel.CheckReleaseGroup(tp,cm.descfilter,1,c,c,tp)
and Duel.IsPlayerCanDraw(tp,1)
and cm.cost(e,tp,eg,ep,ev,re,r,rp,0)
else
......@@ -97,7 +97,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.descfilter,1,1,c,c,tp)
local sg=Duel.SelectReleaseGroup(tp,cm.descfilter,1,1,c,c,tp)
Duel.Release(sg,REASON_COST)
end
cm.cost(e,tp,eg,ep,ev,re,r,rp,1)
......
......@@ -75,14 +75,14 @@ function cm.tgfilter(c)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_DECK,0,1,nil)
and Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.filter,1,e:GetHandler()) end
and Duel.CheckReleaseGroupEx(tp,cm.filter,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(cm.tgfilter,tp,LOCATION_DECK,0,nil)
if ct==0 then ct=1 end
if ct>2 then ct=2 end
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.filter,1,ct,nil)
local g=Duel.SelectReleaseGroupEx(tp,cm.filter,1,ct,nil)
if g:GetCount()>0 then
local rct=Duel.Release(g,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
......@@ -74,8 +74,8 @@ function cm.costfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(3) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -62,8 +62,8 @@ function cm.cfilter(c)
return c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(8) and not c:IsCode(m)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -76,7 +76,7 @@ end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsPlayerCanRemove(1-tp) then return end
local g=Duel.GetMatchingGroup(cm.rmfilter,1-tp,LOCATION_EXTRA,0,nil)
if g:GetCount()>1 then
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_REMOVE)
local sg=g:Select(1-tp,1,1,nil)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
......
......@@ -91,8 +91,8 @@ function cm.costfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsRace(RACE_BEASTWARRIOR) and c:IsLevel(8) and not c:IsCode(m)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -49,11 +49,11 @@ function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.spfilter,1,nil,ft,tp) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_EXTRA,0)==0
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.spfilter,1,nil,ft,tp) and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_EXTRA,0)==0
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.spfilter,1,1,nil,ft,tp)
local g=Duel.SelectReleaseGroup(tp,cm.spfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function cm.desfilter(c)
......
......@@ -36,7 +36,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil,c,tp) and Duel.GetFlagEffect(tp,m)==0
return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,c,tp) and Duel.GetFlagEffect(tp,m)==0
else
return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) and Duel.GetFlagEffect(tp,m)==0
end
......@@ -44,7 +44,7 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil,c,tp)
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -21,9 +21,9 @@ function cm.initial_effect(c)
end
cm.is_named_with_shirayukianna=1
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsReleasable,1,nil)and Duel.GetFlagEffect(tp,m)==0 end
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsReleasable,1,nil)and Duel.GetFlagEffect(tp,m)==0 end
Duel.RegisterFlagEffect(tp,m,RESET_CHAIN,0,1)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsReleasable,1,1,nil)
local g=Duel.SelectReleaseGroup(tp,Card.IsReleasable,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -28,8 +28,8 @@ function cm.atkfilter2(c)
return c:IsFaceup()
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.atkfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.atkfilter1,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.atkfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.atkfilter1,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -74,14 +74,14 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,c,c,tp,lg)
return Duel.CheckReleaseGroup(tp,cm.costfilter,1,c,c,tp,lg)
else
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,c,c,tp,lg)
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,c,c,tp,lg)
ct=g:GetFirst():GetLink()
Duel.Release(g,REASON_COST)
end
......
......@@ -77,8 +77,8 @@ function cm.costfilter(c)
return c:IsRace(RACE_FAIRY)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -59,8 +59,8 @@ function cm.rfilter(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_FAIRY) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(rg,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -62,8 +62,8 @@ function cm.cfilter(c)
return c:IsType(TYPE_LINK)
end
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,11 +31,11 @@ function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.hspfilter,1,nil,ft,tp)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.hspfilter,1,nil,ft,tp)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,ft,tp)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function cm.spfilter1(c,e)
......
......@@ -31,8 +31,8 @@ function cm.rfilter(c,tp)
return c:IsType(TYPE_FUSION) and c:IsAttribute(ATTRIBUTE_WATER) and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
local rg=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(rg,REASON_COST)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -27,8 +27,8 @@ function cm.cfilter(c,tp)
return c:IsAttack(2200) and c:IsDefense(700) and (c:IsControler(tp) or c:IsFaceup()) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -51,14 +51,14 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil,c,tp)
return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,c,tp)
else
return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil,c,tp)
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,c,tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
......
......@@ -37,8 +37,8 @@ function cm.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and not c:IsCode(m)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,8 +31,8 @@ function cm.cfilter(c)
return c:IsAttack(1750) and c:IsDefense(1350)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,nil)
Duel.Release(g,REASON_COST)
end
function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -455,14 +455,14 @@ function Tenka.SliverSpcop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp)
end
--Arisa
function Arisugawa.Arisa(c)
function Tenka.ArisugawaArisa(c)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_IMMUNE_EFFECT)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Arisugawa.iscon)
ea:SetValue(Arisugawa.esfilter)
ea:SetCondition(Tenka.Arisugawaiscon)
ea:SetValue(Tenka.Arisugawaesfilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(60018000,0))
......@@ -470,25 +470,25 @@ function Arisugawa.Arisa(c)
eb:SetProperty(EFFECT_FLAG_CARD_TARGET)
eb:SetRange(LOCATION_MZONE)
eb:SetCountLimit(1)
eb:SetTarget(Arisugawa.mvtg)
eb:SetOperation(Arisugawa.mvop)
eb:SetTarget(Tenka.Arisugawamvtg)
eb:SetOperation(Tenka.Arisugawamvop)
c:RegisterEffect(eb)
end
function Arisugawa.iscon(e)
function Tenka.Arisugawaiscon(e)
local seq=e:GetHandler():GetSequence()
return seq==0 or seq==4
end
function Arisugawa.esfilter(e,te)
function Tenka.Arisugawaesfilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function Arisugawa.mvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
function Tenka.Arisugawamvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil)
and Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)>0 end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(60018000,2))
Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
end
function Arisugawa.mvop(e,tp,eg,ep,ev,re,r,rp)
function Tenka.Arisugawamvop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_MZONE,PLAYER_NONE,0)<=0 then return end
......@@ -497,14 +497,14 @@ function Arisugawa.mvop(e,tp,eg,ep,ev,re,r,rp)
local nseq=math.log(s,2)
Duel.MoveSequence(tc,nseq)
end
function Arisugawa.ArisaB(c)
function Tenka.ArisugawaArisaB(c)
local ea=Effect.CreateEffect(c)
ea:SetType(EFFECT_TYPE_SINGLE)
ea:SetCode(EFFECT_IMMUNE_EFFECT)
ea:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
ea:SetRange(LOCATION_MZONE)
ea:SetCondition(Arisugawa.iscon)
ea:SetValue(Arisugawa.esfilter)
ea:SetCondition(Tenka.Arisugawaiscon)
ea:SetValue(Tenka.Arisugawaesfilter)
c:RegisterEffect(ea)
local eb=Effect.CreateEffect(c)
eb:SetDescription(aux.Stringid(60018000,0))
......@@ -513,31 +513,31 @@ function Arisugawa.ArisaB(c)
eb:SetProperty(EFFECT_FLAG_CARD_TARGET)
eb:SetRange(LOCATION_MZONE)
eb:SetCountLimit(1)
eb:SetTarget(Arisugawa.mvtg)
eb:SetOperation(Arisugawa.mvop)
eb:SetTarget(Tenka.Arisugawamvtg)
eb:SetOperation(Tenka.Arisugawamvop)
c:RegisterEffect(eb)
end
--Kanon
function Kanon.Attack(c)
function Tenka.KanonAttack(c)
local ea=Effect.CreateEffect(c)
ea:SetDescription(aux.Stringid(20123001,1))
ea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
ea:SetCode(EVENT_BATTLE_START)
ea:SetTarget(Kanon.ChainAttackTg)
ea:SetTarget(Tenka.KanonChainAttackTg)
ea:SetRange(LOCATION_MZONE)
ea:SetCategory(CATEGORY_ATKCHANGE)
ea:SetOperation(Kanon.ChainAttackOp)
ea:SetOperation(Tenka.KanonChainAttackOp)
ea:SetCountLimit(1)
c:RegisterEffect(ea)
end
function Kanon.ChainAttackTg(e,tp,eg,ep,ev,re,r,rp,chk)
function Tenka.KanonChainAttackTg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsControler(tp) and ac:IsRace(RACE_WARRIOR) and ac~=c
and c:GetAttackAnnouncedCount()==0 and c:IsAttackable() end
Duel.SetTargetCard(c)
end
function Kanon.ChainAttackOp(e,tp,eg,ep,ev,re,r,rp)
function Tenka.KanonChainAttackOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local atk=c:GetAttack()
......@@ -554,13 +554,13 @@ function Kanon.ChainAttackOp(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(Kanon.ChainAttackCon)
e2:SetCondition(Tenka.KanonChainAttackCon)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
ac:RegisterEffect(e2)
end
end
function Kanon.ChainAttackCon(e,tp,eg,ep,ev,re,r,rp)
function Tenka.KanonChainAttackCon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle()
......
......@@ -37,8 +37,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
end
function cm.setcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,nil,RACE_CYBERSE) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,nil,RACE_CYBERSE)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_CYBERSE) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_CYBERSE)
Duel.Release(g,REASON_COST)
end
function cm.setfilter(c,tp)
......
......@@ -29,8 +29,8 @@ function cm.cfilter(c,tp)
and (c:IsFaceup() or c:IsControler(tp))
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -61,9 +61,9 @@ function cm.cfilter(c,tp)
and (c:IsControler(tp) or c:IsFaceup())
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -35,8 +35,8 @@ function cm.cfilter(c)
and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.condition1(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -30,9 +30,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,9 +30,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,9 +30,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,9 +30,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -31,9 +31,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,9 +30,9 @@ function cm.costfilter(c,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,e:GetHandler(),tp) end
if chk==0 then return Duel.CheckReleaseGroupEx(tp,cm.costfilter,1,e:GetHandler(),tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(REASON_COST,tp,cm.costfilter,1,1,e:GetHandler(),tp)
local g=Duel.SelectReleaseGroupEx(tp,cm.costfilter,1,1,e:GetHandler(),tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -77,10 +77,10 @@ function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return cm.cost(e,tp,eg,ep,ev,re,r,rp,0)
and Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp)
and Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp)
end
cm.cost(e,tp,eg,ep,ev,re,r,rp,1)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
local rg=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
e:SetValue(rg:GetFirst():GetCode())
Duel.Release(rg,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
......@@ -40,8 +40,8 @@ function cm.cfilter(c,ft,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,ft,tp)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function cm.spfilter(c,e,tp)
......@@ -77,8 +77,8 @@ function cm.nsgcon(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev) and Duel.IsEnvironment(81010004)
end
function cm.nsgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
Duel.Release(g,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -78,8 +78,8 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsEnvironment(81010004)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -21,8 +21,8 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsAttribute,2,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsAttribute,2,2,nil,ATTRIBUTE_WIND)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,2,nil,ATTRIBUTE_WIND) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,2,2,nil,ATTRIBUTE_WIND)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -96,8 +96,8 @@ function cm.tkop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(token,0,1-tp,1-tp,false,false,POS_FACEUP_ATTACK)
end
function cm.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) and cm.cost(e,tp,eg,ep,ev,re,r,rp,0) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsAttribute,1,nil,ATTRIBUTE_WIND) and cm.cost(e,tp,eg,ep,ev,re,r,rp,0) end
local g=Duel.SelectReleaseGroup(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_WIND)
Duel.Release(g,REASON_COST)
cm.cost(e,tp,eg,ep,ev,re,r,rp,1)
end
......
......@@ -30,9 +30,9 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp)
return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp)
end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
e:SetLabelObject(g:GetFirst())
Duel.Release(g,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
......@@ -34,8 +34,8 @@ function cm.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target1(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -97,8 +97,8 @@ function cm.slfilter(c)
return c:IsType(TYPE_EFFECT)
end
function cm.slcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.slfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.slfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.slfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.slfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
......@@ -118,8 +118,8 @@ function cm.rmfilter(c)
return c:IsType(TYPE_NORMAL) and not c:IsType(TYPE_TOKEN)
end
function cm.remcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rmfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rmfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rmfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.rmfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
......
......@@ -58,10 +58,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,2,2,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
Duel.PayLPCost(tp,1500)
......
......@@ -58,10 +58,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,2,2,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
Duel.PayLPCost(tp,1500)
......
......@@ -59,10 +59,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,2,2,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
Duel.PayLPCost(tp,1500)
......
......@@ -59,10 +59,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,2,2,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
Duel.PayLPCost(tp,1500)
......
......@@ -58,10 +58,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,2,nil,c:GetControler(),c) and Duel.CheckLPCost(c:GetControler(),1500)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,2,2,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,2,2,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
Duel.PayLPCost(tp,1500)
......
......@@ -19,8 +19,8 @@ function c81012030.costfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and (c:IsControler(tp) or c:IsFaceup())
end
function c81012030.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c81012030.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,c81012030.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81012030.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,c81012030.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function c81012030.thfilter(c)
......
......@@ -40,8 +40,8 @@ function c81012044.initial_effect(c)
c:RegisterEffect(e4)
end
function c81012044.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,nil,RACE_PYRO) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,nil,RACE_PYRO)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PYRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PYRO)
Duel.Release(g,REASON_COST)
end
function c81012044.thfilter(c)
......
......@@ -27,8 +27,8 @@ function c81012049.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c81012049.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,c81012049.costfilter,1,nil,e,tp,g,ft) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,c81012049.costfilter,1,1,nil,e,tp,g,ft)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c81012049.costfilter,1,nil,e,tp,g,ft) end
local sg=Duel.SelectReleaseGroup(tp,c81012049.costfilter,1,1,nil,e,tp,g,ft)
e:SetLabel(sg:GetFirst():GetLevel()*2)
Duel.Release(sg,REASON_COST)
end
......
......@@ -88,8 +88,8 @@ function cm.cfilter(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM)
end
function cm.actcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.actop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -112,8 +112,8 @@ function cm.ctfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.ctfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.ctfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -27,8 +27,8 @@ function c81015015.cfilter(c,ft,tp)
end
function c81015015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,c81015015.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c81015015.cfilter,1,1,nil,ft,tp)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,c81015015.cfilter,1,nil,ft,tp) end
local g=Duel.SelectReleaseGroup(tp,c81015015.cfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function c81015015.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -51,8 +51,8 @@ function c81015039.spop(e,tp,eg,ep,ev,re,r,rp)
end
function c81015039.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsLevel,1,c,6) end
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsLevel,1,1,c,6)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsLevel,1,c,6) end
local rg=Duel.SelectReleaseGroup(tp,Card.IsLevel,1,1,c,6)
Duel.Release(rg,REASON_COST)
end
function c81015039.filter(c)
......
......@@ -31,8 +31,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e2)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,nil,0x81a) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,1,nil,0x81a)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x81a) end
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x81a)
Duel.Release(g,REASON_COST)
end
function cm.thfilter(c)
......
......@@ -39,8 +39,8 @@ function cm.rfilter(c,tp)
return c:IsSetCard(0x81a) and c:IsSummonableCard() and (c:IsControler(tp) or c:IsFaceup()) and Duel.GetMZoneCount(tp,c)>0
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.ssfilter(c,e,tp)
......
......@@ -32,8 +32,8 @@ function c81018004.chcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsActiveType(TYPE_MONSTER) and rp==1-tp
end
function c81018004.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsLevel,1,nil,9) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsLevel,1,1,nil,9)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsLevel,1,nil,9) end
local g=Duel.SelectReleaseGroup(tp,Card.IsLevel,1,1,nil,9)
Duel.Release(g,REASON_COST)
end
function c81018004.chop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -82,8 +82,8 @@ end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.HintSelection(Group.FromCards(c))
if Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,nil,0x81b) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsSetCard,1,1,nil,0x81b)
if Duel.CheckReleaseGroup(tp,Card.IsSetCard,1,nil,0x81b) and Duel.SelectYesNo(tp,aux.Stringid(m,0)) then
local g=Duel.SelectReleaseGroup(tp,Card.IsSetCard,1,1,nil,0x81b)
Duel.Release(g,REASON_COST)
else Duel.Destroy(c,REASON_COST) end
end
......
......@@ -88,8 +88,8 @@ function cm.desop(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.sscfilter,1,nil,ft,tp) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.sscfilter,1,1,e:GetHandler(),ft,tp)
if chk==0 then return ft>-1 and Duel.CheckReleaseGroup(tp,cm.sscfilter,1,nil,ft,tp) end
local sg=Duel.SelectReleaseGroup(tp,cm.sscfilter,1,1,e:GetHandler(),ft,tp)
Duel.Release(sg,REASON_COST)
end
function cm.ssfilter(c,e,tp)
......
......@@ -69,8 +69,8 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,nil,RACE_PYRO) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,nil,RACE_PYRO)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_PYRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_PYRO)
Duel.Release(g,REASON_COST)
end
function cm.thfilter(c)
......
......@@ -101,8 +101,8 @@ function cm.tkop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function cm.rmcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_PYRO) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_PYRO)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_PYRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_PYRO)
Duel.Release(g,REASON_COST)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -84,8 +84,8 @@ function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
rc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,2))
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_PYRO) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_PYRO)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_PYRO) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_PYRO)
Duel.Release(g,REASON_COST)
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -109,8 +109,8 @@ function cm.discon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.sfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.sfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.sfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.sfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -42,8 +42,8 @@ function cm.spfilter(c,e,tp,code)
return c:IsSetCard(0x3552) and c:IsType(TYPE_MONSTER) and not c:IsCode(code) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil,e,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil,e,tp)
e:SetLabel(g:GetFirst():GetCode())
Duel.Release(g,REASON_COST)
end
......
......@@ -66,8 +66,8 @@ function cm.cfilter(c,e,tp)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,e,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,e,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,e,tp)
Duel.Release(g,REASON_COST)
end
function cm.filter(c,e,tp,rc)
......
......@@ -50,9 +50,9 @@ function cm.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_TUNER)
end
function cm.sscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -30,8 +30,8 @@ function cm.cfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsType(TYPE_SYNCHRO) and c:IsType(TYPE_TUNER) and c:IsAttribute(ATTRIBUTE_WIND) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......@@ -52,8 +52,8 @@ function cm.cfilter2(c,tp)
return c:IsRace(RACE_REPTILE) and c:IsType(TYPE_SYNCHRO) and not c:IsType(TYPE_TUNER) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter2,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter2,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter2,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter2,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.activate2(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -37,8 +37,8 @@ function cm.cfilter(c,g)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local lg=e:GetHandler():GetLinkedGroup()
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,lg) and Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,0) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,lg)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,lg) and Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,0) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,lg)
Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,1)
Duel.Release(g,REASON_COST)
end
......
......@@ -35,11 +35,11 @@ function cm.hspcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
return ft>-1 and Duel.CheckReleaseGroup(REASON_COST,tp,cm.hspfilter,1,nil,ft,tp)
return ft>-1 and Duel.CheckReleaseGroup(tp,cm.hspfilter,1,nil,ft,tp)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,ft,tp)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,ft,tp)
Duel.Release(g,REASON_COST)
end
function cm.cfilter(c)
......
......@@ -30,9 +30,9 @@ function cm.rfilter(c)
return c.named_with_SliverScene
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil) and Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,0) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil) and Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,0) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil)
Duel.Release(g,REASON_COST)
Tenka.SliverCost(e,tp,eg,ep,ev,re,r,rp,1)
end
......
......@@ -19,9 +19,9 @@ function cm.rfilter(c)
return c:IsRace(RACE_PLANT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.thfilter1(c)
......
......@@ -40,8 +40,8 @@ function cm.costfilter(c)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x381f) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsLevel(4)
end
function cm.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.negtg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -51,8 +51,8 @@ function cm.costfilter(c)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x381f) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsLevel(4)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -35,8 +35,8 @@ function cm.costfilter(c)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x381f) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsLevel(4)
end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -37,14 +37,14 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=0 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil)
return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil)
else
return Duel.IsExistingMatchingCard(cm.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local rg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
local rg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(rg,REASON_COST)
end
local g=Duel.GetMatchingGroup(cm.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
......
......@@ -20,9 +20,9 @@ function cm.rfilter(c,tp)
return Duel.GetMZoneCount(tp,c)>0 and c:IsRace(RACE_PLANT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -16,8 +16,8 @@ function cm.initial_effect(c)
c:RegisterEffect(e1)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,Card.IsRace,1,e:GetHandler(),RACE_PLANT) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,Card.IsRace,1,1,e:GetHandler(),RACE_PLANT)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,e:GetHandler(),RACE_PLANT) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,e:GetHandler(),RACE_PLANT)
Duel.Release(g,REASON_COST)
end
function cm.filter(c)
......
......@@ -43,8 +43,8 @@ function cm.costfilter(c)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x381f) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsLevelBelow(8)
end
function cm.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -20,8 +20,8 @@ function cm.cfilter(c,tp)
return c:IsRace(RACE_PLANT) and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -49,8 +49,8 @@ function cm.costfilter(c)
return (c:IsControler(tp) or c:IsFaceup()) and c:IsSetCard(0x381f) and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
end
function cm.atkfilter(c)
......
......@@ -39,8 +39,8 @@ function c81041006.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>c:GetOriginalLevel()
end
function c81041006.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c81041006.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c81041006.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81041006.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c81041006.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c81041006.distg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -38,8 +38,8 @@ function c81041009.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>c:GetOriginalLevel()
end
function c81041009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c81041009.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c81041009.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81041009.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c81041009.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c81041009.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -15,8 +15,8 @@ function c81041021.cfilter(c,tp)
return bit.band(c:GetType(),0x81)==0x81 and c:IsType(TYPE_PENDULUM) and c:GetLevel()<c:GetOriginalLevel() and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0
end
function c81041021.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,c81041021.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,c81041021.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,c81041021.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c81041021.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function c81041021.filter(c,e,tp)
......
......@@ -62,8 +62,8 @@ function cm.cfilter(c,tp)
return c:GetBaseAttack()==1550 and Duel.GetMZoneCount(tp,c)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -53,8 +53,8 @@ function cm.cfilter(c)
and Duel.IsExistingTarget(cm.lvfilter,tp,LOCATION_MZONE,0,1,c)
end
function cm.lvcosta(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.cfilter,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.lvcostb(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -48,8 +48,8 @@ function cm.atkfilter2(c)
return c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:IsFaceup()
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.atkfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.atkfilter1,1,1,nil,tp)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.atkfilter1,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,cm.atkfilter1,1,1,nil,tp)
e:SetLabel(g:GetFirst():GetLevel())
Duel.Release(g,REASON_COST)
end
......
......@@ -39,8 +39,8 @@ function cm.costfilter(c)
return c:IsFaceup() and c:IsType(TYPE_RITUAL) and c:IsType(TYPE_PENDULUM) and c:GetLevel()>c:GetOriginalLevel()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) end
local g=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(g,REASON_COST)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,9 +28,9 @@ function cm.rfilter(c,tp)
return c:GetBaseAttack()==1550 and c:IsType(TYPE_LINK) and (c:IsControler(tp) or c:IsFaceup())
end
function cm.limcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,nil,tp) end
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,nil,tp)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.limop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -41,10 +41,10 @@ function cm.hspfilter(c,tp,sc)
end
function cm.hspcon(e,c)
if c==nil then return true end
return Duel.CheckReleaseGroup(REASON_COST,c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
return Duel.CheckReleaseGroup(c:GetControler(),cm.hspfilter,1,nil,c:GetControler(),c)
end
function cm.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(REASON_COST,tp,cm.hspfilter,1,1,nil,tp,c)
local g=Duel.SelectReleaseGroup(tp,cm.hspfilter,1,1,nil,tp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_COST)
end
......
......@@ -66,14 +66,14 @@ function cm.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then
if e:GetLabel()==1 then
e:SetLabel(0)
return Duel.CheckReleaseGroup(REASON_COST,tp,cm.rfilter,1,e:GetHandler(),tp)
return Duel.CheckReleaseGroup(tp,cm.rfilter,1,e:GetHandler(),tp)
else
return Duel.IsExistingTarget(cm.ctfilter,tp,0,LOCATION_MZONE,1,nil,tp)
end
end
if e:GetLabel()==1 then
e:SetLabel(0)
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.rfilter,1,1,e:GetHandler(),tp)
local sg=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,e:GetHandler(),tp)
Duel.Release(sg,REASON_COST)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONTROL)
......
......@@ -53,9 +53,9 @@ function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_WIND) and not c:IsType(TYPE_TOKEN)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(REASON_COST,tp,cm.costfilter,1,nil) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.costfilter,1,nil) and Duel.GetCustomActivityCount(m,tp,ACTIVITY_SPSUMMON)==0
and Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local sg=Duel.SelectReleaseGroup(REASON_COST,tp,cm.costfilter,1,1,nil)
local sg=Duel.SelectReleaseGroup(tp,cm.costfilter,1,1,nil)
Duel.Release(sg,REASON_COST)
local e0=Effect.CreateEffect(e:GetHandler())
e0:SetType(EFFECT_TYPE_FIELD)
......
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