Commit 98bc7eac authored by nekrozar's avatar nekrozar Committed by DailyShana

new card 20AP (#808)

parent fd7fbaed
--エンタメデュエル
function c19162134.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1)
e2:SetCondition(c19162134.spcon1)
e2:SetOperation(c19162134.drop1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCondition(c19162134.spcon2)
e3:SetOperation(c19162134.drop2)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EVENT_BATTLED)
e4:SetCondition(c19162134.btcon1)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_BATTLED)
e5:SetCondition(c19162134.btcon2)
c:RegisterEffect(e5)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_FZONE)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e6=e2:Clone()
e6:SetCode(EVENT_CHAIN_SOLVING)
e6:SetCondition(c19162134.chcon1)
c:RegisterEffect(e6)
local e7=e3:Clone()
e7:SetCode(EVENT_CHAIN_SOLVING)
e7:SetCondition(c19162134.chcon2)
c:RegisterEffect(e7)
local e8=e2:Clone()
e8:SetCode(EVENT_CHAIN_SOLVED)
e8:SetCondition(c19162134.tosscon1)
c:RegisterEffect(e8)
local e9=e3:Clone()
e9:SetCode(EVENT_CHAIN_SOLVED)
e9:SetCondition(c19162134.tosscon2)
c:RegisterEffect(e9)
local ea=e2:Clone()
ea:SetCode(EVENT_DAMAGE)
ea:SetCondition(c19162134.damcon1)
c:RegisterEffect(ea)
local eb=e3:Clone()
eb:SetCode(EVENT_DAMAGE)
eb:SetCondition(c19162134.damcon2)
c:RegisterEffect(eb)
end
function c19162134.spfilter(c,tp)
return c:GetSummonPlayer()==tp
end
function c19162134.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==5 and eg:IsExists(c19162134.spfilter,1,nil,tp) and eg:GetClassCount(Card.GetLevel)==5
end
function c19162134.spcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:GetCount()==5 and eg:IsExists(c19162134.spfilter,1,nil,1-tp) and eg:GetClassCount(Card.GetLevel)==5
end
function c19162134.drop1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,19162134)
Duel.Draw(tp,2,REASON_EFFECT)
end
function c19162134.drop2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,19162134)
Duel.Draw(1-tp,2,REASON_EFFECT)
end
function c19162134.btcon1(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a,d=d,a end
if a then
a:RegisterFlagEffect(19162134,RESET_EVENT+0x3fe0000+RESET_PHASE+PHASE_END,0,1)
return a:GetFlagEffect(19162134)==5
else return false end
end
function c19162134.btcon2(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(tp) then a,d=d,a end
if a then
a:RegisterFlagEffect(19162134,RESET_EVENT+0x3fe0000+RESET_PHASE+PHASE_END,0,1)
return a:GetFlagEffect(19162134)==5
else return false end
end
function c19162134.chcon1(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and Duel.GetCurrentChain()>=5 and e:GetHandler():GetFlagEffect(1)>0
end
function c19162134.chcon2(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetCurrentChain()>=5 and e:GetHandler():GetFlagEffect(1)>0
end
function c19162134.tosscon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTossedCoinCount(tp)+Duel.GetTossedDiceCount(tp)>=5 and e:GetHandler():GetFlagEffect(1)>0
end
function c19162134.tosscon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTossedCoinCount(1-tp)+Duel.GetTossedDiceCount(1-tp)>=5 and e:GetHandler():GetFlagEffect(1)>0
end
function c19162134.damcon1(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetLP(tp)<=500
end
function c19162134.damcon2(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and Duel.GetLP(1-tp)<=500
end
--集いし願い
function c20007374.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c20007374.condition)
e1:SetTarget(c20007374.target)
e1:SetOperation(c20007374.activate)
c:RegisterEffect(e1)
--atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c20007374.atkval)
c:RegisterEffect(e2)
--chain attack
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(20007374,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_BATTLE_DESTROYING)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c20007374.cacon)
e4:SetCost(c20007374.cacost)
e4:SetTarget(c20007374.catg)
e4:SetOperation(c20007374.caop)
c:RegisterEffect(e4)
end
function c20007374.cfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsRace(RACE_DRAGON)
end
function c20007374.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c20007374.cfilter,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=5
end
function c20007374.filter(c,e,tp)
return c:IsCode(44508094) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_SYNCHRO,tp,false,false)
end
function c20007374.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20007374.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c20007374.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsLocation(LOCATION_SZONE) 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,c20007374.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if c:IsRelateToEffect(e) and tc and Duel.SpecialSummonStep(tc,SUMMON_TYPE_SYNCHRO,tp,tp,false,false,POS_FACEUP) then
Duel.Equip(tp,c,tc)
c:CancelToGrave()
--Add Equip limit
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
e1:SetValue(c20007374.eqlimit)
c:RegisterEffect(e1)
tc:RegisterFlagEffect(20007374,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1,fid)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCountLimit(1)
e2:SetLabel(fid)
e2:SetLabelObject(tc)
e2:SetCondition(c20007374.rmcon)
e2:SetOperation(c20007374.rmop)
Duel.RegisterEffect(e2,tp)
Duel.SpecialSummonComplete()
end
end
function c20007374.eqlimit(e,c)
return e:GetOwner()==c
end
function c20007374.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(20007374)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c20007374.rmop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
function c20007374.atkfilter(c)
return c20007374.cfilter(c) and c:GetAttack()>0
end
function c20007374.atkval(e,c)
local g=Duel.GetMatchingGroup(c20007374.atkfilter,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil)
return g:GetSum(Card.GetAttack)
end
function c20007374.cacon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and eg:IsContains(ec)
end
function c20007374.cafilter(c)
return c20007374.cfilter(c) and c:IsAbleToRemoveAsCost()
end
function c20007374.cacost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c20007374.cafilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c20007374.cafilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c20007374.catg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if chk==0 then return ec:IsChainAttackable(0,true) end
end
function c20007374.caop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if not ec:IsRelateToBattle() then return end
Duel.ChainAttack()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_BATTLE+PHASE_DAMAGE_CAL)
ec:RegisterEffect(e1)
end
--マスター・ピース
function c20285786.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetTarget(c20285786.target)
e1:SetOperation(c20285786.activate)
c:RegisterEffect(e1)
end
function c20285786.filter(c,e,tp)
return c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c20285786.xyzfilter(c,mg)
return c:IsSetCard(0x7f) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsXyzSummonable(mg,2,2)
end
function c20285786.mfilter1(c,mg,exg)
return mg:IsExists(c20285786.mfilter2,1,c,c,exg)
end
function c20285786.mfilter2(c,mc,exg)
return exg:IsExists(Card.IsXyzSummonable,1,nil,Group.FromCards(c,mc))
end
function c20285786.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
local mg=Duel.GetMatchingGroup(c20285786.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local exg=Duel.GetMatchingGroup(c20285786.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
and exg:GetCount()>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:FilterSelect(tp,c20285786.mfilter1,1,1,nil,mg,exg)
local tc1=sg1:GetFirst()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg2=mg:FilterSelect(tp,c20285786.mfilter2,1,1,tc1,tc1,exg)
sg1:Merge(sg2)
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0)
end
function c20285786.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c20285786.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<2 then return end
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(c20285786.filter2,nil,e,tp)
if g:GetCount()<2 then return end
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
Duel.BreakEffect()
local xyzg=Duel.GetMatchingGroup(c20285786.xyzfilter,tp,LOCATION_EXTRA,0,nil,g)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
Duel.XyzSummon(tp,xyz,g)
end
end
--コズミック・ブレイザー・ドラゴン
function c21123811.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsType,TYPE_SYNCHRO),aux.NonTuner(Card.IsType,TYPE_SYNCHRO),2)
c:EnableReviveLimit()
--cannot special summon
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(aux.synlimit)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(21123811,0))
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c21123811.discon)
e2:SetCost(c21123811.cost)
e2:SetTarget(c21123811.distg)
e2:SetOperation(c21123811.disop)
c:RegisterEffect(e2)
--disable spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(21123811,1))
e3:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SUMMON)
e3:SetCondition(c21123811.dscon)
e3:SetCost(c21123811.cost)
e3:SetTarget(c21123811.dstg)
e3:SetOperation(c21123811.dsop)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e5)
--negate attack
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(21123811,2))
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_ATTACK_ANNOUNCE)
e6:SetCountLimit(1)
e6:SetCondition(c21123811.negcon)
e6:SetCost(c21123811.cost)
e6:SetOperation(c21123811.negop)
c:RegisterEffect(e6)
end
function c21123811.discon(e,tp,eg,ep,ev,re,r,rp)
return rp~=tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c21123811.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
if Duel.Remove(c,POS_FACEUP,REASON_COST+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(c)
e1:SetCountLimit(1)
e1:SetOperation(c21123811.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c21123811.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c21123811.disop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
function c21123811.dscon(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0
end
function c21123811.dstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c21123811.dsop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c21123811.negcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c21123811.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateAttack() then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE,1)
end
end
function c21123811.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
...@@ -35,9 +35,22 @@ function c44508094.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,9 +35,22 @@ function c44508094.condition(e,tp,eg,ep,ev,re,r,rp)
local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY) local ex,tg,tc=Duel.GetOperationInfo(ev,CATEGORY_DESTROY)
return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0 return ex and tg~=nil and tc+tg:FilterCount(Card.IsOnField,nil)-tg:GetCount()>0
end end
function c44508094.cfcost(c)
return c:IsCode(84012625) and c:IsAbleToRemoveAsCost()
end
function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c44508094.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end local b1=e:GetHandler():IsReleasable()
local b2=Duel.IsExistingMatchingCard(c44508094.cfcost,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if (b2 and b1 and Duel.SelectYesNo(tp,aux.Stringid(84012625,0)))
or (b2 and not b1) then
local tg=Duel.GetFirstMatchingCard(c44508094.cfcost,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
e:SetLabel(0)
else
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
e:SetLabel(1)
end
end end
function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk) function c44508094.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--ドン・サウザンドの契約
function c56673480.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,56673480+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c56673480.target)
e1:SetOperation(c56673480.activate)
c:RegisterEffect(e1)
--public
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DRAW)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c56673480.drop)
c:RegisterEffect(e2)
local g=Group.CreateGroup()
g:KeepAlive()
e2:SetLabelObject(g)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PUBLIC)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
e3:SetCondition(c56673480.pubcon)
e3:SetTarget(c56673480.pubtg)
e3:SetLabelObject(g)
c:RegisterEffect(e3)
--cannot summon
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SUMMON)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(c56673480.scon1)
e4:SetLabelObject(g)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e5)
local e6=e4:Clone()
e6:SetTargetRange(0,1)
e6:SetCondition(c56673480.scon2)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e7)
end
function c56673480.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>=1000 and Duel.IsPlayerCanDraw(tp,1)
and Duel.GetLP(1-tp)>=1000 and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c56673480.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local lp0=Duel.GetLP(tp)
if lp0>=1000 then
Duel.SetLP(tp,lp0-1000)
Duel.Draw(tp,1,REASON_EFFECT)
end
local lp1=Duel.GetLP(1-tp)
if lp1>=1000 then
Duel.SetLP(1-tp,lp1-1000)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
end
function c56673480.drop(e,tp,eg,ep,ev,re,r,rp)
if not eg then return end
local c=e:GetHandler()
local pg=e:GetLabelObject()
if c:GetFlagEffect(56673480)==0 then
c:RegisterFlagEffect(56673480,RESET_EVENT+0x1ff0000,0,1)
pg:Clear()
end
local tc=eg:GetFirst()
while tc do
pg:AddCard(tc)
tc:RegisterFlagEffect(56673481,RESET_EVENT+0x1fe0000,0,1)
tc=eg:GetNext()
end
end
function c56673480.pubcon(e)
return e:GetHandler():GetFlagEffect(56673480)~=0
end
function c56673480.pubtg(e,c)
return e:GetLabelObject():IsContains(c) and c:GetFlagEffect(56673481)~=0
end
function c56673480.sfilter(c,pg)
return c:IsPublic() and pg:IsContains(c) and c:GetFlagEffect(56673481)>0 and c:IsType(TYPE_SPELL)
end
function c56673480.scon1(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c56673480.sfilter,tp,LOCATION_HAND,0,1,nil,e:GetLabelObject())
end
function c56673480.scon2(e)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c56673480.sfilter,tp,0,LOCATION_HAND,1,nil,e:GetLabelObject())
end
--ぶつかり合う魂
function c57496978.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e1:SetCondition(c57496978.condition)
e1:SetOperation(c57496978.activate)
c:RegisterEffect(e1)
end
function c57496978.condition(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(1-tp) then a=Duel.GetAttackTarget() d=Duel.GetAttacker() end
return a and d and a:IsAttackPos() and d:IsAttackPos() and a:GetAttack()<d:GetAttack()
end
function c57496978.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsFaceup() and a:IsRelateToBattle() and d:IsFaceup() and d:IsRelateToBattle() then
local g=Group.FromCards(a,d)
local chk=true
while chk do
local tg=g:GetMinGroup(Card.GetAttack)
local tc=tg:GetFirst()
if tg:GetCount()==1 and Duel.CheckLPCost(tc:GetControler(),500)
and Duel.SelectYesNo(tc:GetControler(),aux.Stringid(57496978,0)) then
Duel.PayLPCost(tc:GetControler(),500)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_DAMAGE_CAL)
tg:GetFirst():RegisterEffect(e1)
else
chk=false
end
end
g:KeepAlive()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetOperation(c57496978.damop)
e2:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_BATTLED)
e3:SetLabelObject(g)
e3:SetOperation(c57496978.tgop)
e3:SetReset(RESET_PHASE+PHASE_DAMAGE)
Duel.RegisterEffect(e3,tp)
end
end
function c57496978.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,0)
Duel.ChangeBattleDamage(1-tp,0)
end
function c57496978.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject():Filter(Card.IsStatus,nil,STATUS_BATTLE_DESTROYED)
local tg=Group.CreateGroup()
if g:IsExists(Card.IsControler,1,nil,tp) then
local g1=Duel.GetFieldGroup(tp,LOCATION_ONFIELD,0)
tg:Merge(g1)
end
if g:IsExists(Card.IsControler,1,nil,1-tp) then
local g2=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
tg:Merge(g2)
end
if tg:GetCount()>0 then
Duel.SendtoGrave(tg,REASON_EFFECT)
end
end
--クリア・エフェクター
function c58518520.initial_effect(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58518520,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_BE_MATERIAL)
e1:SetCondition(c58518520.drcon)
e1:SetTarget(c58518520.drtg)
e1:SetOperation(c58518520.drop)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BE_MATERIAL)
e2:SetCondition(c58518520.indcon)
e2:SetOperation(c58518520.indop)
c:RegisterEffect(e2)
end
function c58518520.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and r==REASON_SYNCHRO
end
function c58518520.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c58518520.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c58518520.indcon(e,tp,eg,ep,ev,re,r,rp)
return r==REASON_SYNCHRO
end
function c58518520.indop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local rc=c:GetReasonCard()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(58518520,1))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000)
rc:RegisterEffect(e1)
end
...@@ -41,9 +41,22 @@ end ...@@ -41,9 +41,22 @@ end
function c74892653.condition(e,tp,eg,ep,ev,re,r,rp) function c74892653.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=ep and Duel.GetCurrentChain()==0 return tp~=ep and Duel.GetCurrentChain()==0
end end
function c74892653.cfcost(c)
return c:IsCode(84012625) and c:IsAbleToRemoveAsCost()
end
function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c74892653.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end local b1=e:GetHandler():IsReleasable()
local b2=Duel.IsExistingMatchingCard(c74892653.cfcost,tp,LOCATION_GRAVE,0,1,nil)
if chk==0 then return b1 or b2 end
if (b2 and b1 and Duel.SelectYesNo(tp,aux.Stringid(84012625,0)))
or (b2 and not b1) then
local tg=Duel.GetFirstMatchingCard(c74892653.cfcost,tp,LOCATION_GRAVE,0,nil)
Duel.Remove(tg,POS_FACEUP,REASON_COST)
e:SetLabel(0)
else
Duel.Release(e:GetHandler(),REASON_COST) Duel.Release(e:GetHandler(),REASON_COST)
e:SetLabel(1)
end
end end
function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk) function c74892653.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
......
--螺旋のストライクバースト
function c82768499.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetTarget(c82768499.target)
c:RegisterEffect(e1)
end
function c82768499.desfilter(c)
return c:IsFaceup() and c:IsSetCard(0x99)
end
function c82768499.thfilter(c)
return c:IsSetCard(0x99) and c:GetLevel()==7 and (c:IsFaceup() or not c:IsLocation(LOCATION_EXTRA)) and c:IsAbleToHand()
end
function c82768499.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) end
local b1=Duel.IsExistingMatchingCard(c82768499.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler())
local b2=Duel.IsExistingMatchingCard(c82768499.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(82768499,0),aux.Stringid(82768499,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(82768499,0))
else
op=Duel.SelectOption(tp,aux.Stringid(82768499,1))+1
end
if op==0 then
e:SetCategory(CATEGORY_DESTROY)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
e:SetOperation(c82768499.desop)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
else
e:SetCategory(CATEGORY_TOHAND)
e:SetProperty(0)
local g=Duel.GetMatchingGroup(c82768499.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,nil)
e:SetOperation(c82768499.thop)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
end
function c82768499.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then Duel.Destroy(tc,REASON_EFFECT) end
end
function c82768499.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c82768499.thfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--ムーンバリア
function c83880087.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_DISABLED)
e1:SetTarget(c83880087.target)
c:RegisterEffect(e1)
--remove overlay replace
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(83880087,2))
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_OVERLAY_REMOVE_REPLACE)
e1:SetRange(LOCATION_GRAVE)
e1:SetCondition(c83880087.rcon)
e1:SetOperation(c83880087.rop)
c:RegisterEffect(e1)
end
function c83880087.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ) and c:IsSetCard(0x107f)
end
function c83880087.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c83880087.filter(chkc) end
if chk==0 then return true end
local op=0
if Duel.IsExistingTarget(c83880087.filter,tp,LOCATION_MZONE,0,1,nil) then
op=Duel.SelectOption(tp,aux.Stringid(83880087,0),aux.Stringid(83880087,1))
else
op=Duel.SelectOption(tp,aux.Stringid(83880087,0))
end
if op==0 then
e:SetCategory(0)
e:SetProperty(0)
e:SetOperation(c83880087.endop)
else
e:SetCategory(CATEGORY_ATKCHANGE)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c83880087.filter,tp,LOCATION_MZONE,0,1,1,nil)
e:SetOperation(c83880087.atkop)
end
end
function c83880087.endop(e,tp,eg,ep,ev,re,r,rp)
local turnp=Duel.GetTurnPlayer()
Duel.SkipPhase(turnp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
Duel.SkipPhase(turnp,PHASE_BATTLE,RESET_PHASE+PHASE_END,1,1)
Duel.SkipPhase(turnp,PHASE_MAIN2,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,turnp)
end
function c83880087.atkop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetBaseAttack()*2)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c83880087.rcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_COST)~=0 and re:IsHasType(0x7e0)
and re:IsActiveType(TYPE_XYZ) and re:GetHandler():IsSetCard(0x107f)
and e:GetHandler():IsAbleToRemoveAsCost()
and ep==e:GetOwnerPlayer() and ev==1
end
function c83880087.rop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
--シューティング・ソニック
function c84012625.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c84012625.condition)
e1:SetTarget(c84012625.target)
e1:SetOperation(c84012625.activate)
c:RegisterEffect(e1)
end
function c84012625.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() or (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c84012625.filter(c)
return c:IsFaceup() and c:IsSetCard(0xa3) and c:IsType(TYPE_SYNCHRO)
end
function c84012625.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c84012625.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c84012625.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c84012625.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c84012625.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
--return to hand
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_BATTLE_START)
e1:SetOwnerPlayer(tp)
e1:SetCondition(c84012625.tdcon)
e1:SetOperation(c84012625.tdop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1,true)
end
end
function c84012625.tdcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
return tp==e:GetOwnerPlayer() and tc and tc:IsControler(1-tp)
end
function c84012625.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment