Commit c8910c43 authored by mercury233's avatar mercury233

new cards 18PR

parent f9eba4da
--ベルキャットファイター
function c22953211.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,3,3,c22953211.lcheck)
c:EnableReviveLimit()
--token
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(22953211,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_BATTLE_DESTROYING)
e1:SetCondition(aux.bdocon)
e1:SetTarget(c22953211.tktg)
e1:SetOperation(c22953211.tkop)
c:RegisterEffect(e1)
end
function c22953211.lcheck(g,lc)
return g:IsExists(Card.IsLinkType,1,nil,TYPE_TOKEN)
end
function c22953211.tktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,0x4011,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) end
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c22953211.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,22953212,0,0x4011,2000,2000,4,RACE_MACHINE,ATTRIBUTE_WIND) then return end
local token=Duel.CreateToken(tp,22953212)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP_DEFENSE)
end
--リンク・パーティー
function c68957925.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_RECOVER+CATEGORY_DAMAGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,68957925+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c68957925.target)
e1:SetOperation(c68957925.activate)
c:RegisterEffect(e1)
end
function c68957925.filter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c68957925.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroup(c68957925.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetAttribute)
if chk==0 then return (ct==1 and Duel.IsExistingMatchingCard(c68957925.filter,tp,LOCATION_MZONE,0,1,nil))
or (ct==2 and Duel.IsExistingMatchingCard(c68957925.filter,tp,0,LOCATION_MZONE,1,nil))
or ct==3 or ct==4
or (ct==5 and Duel.IsExistingMatchingCard(c68957925.spfilter,tp,LOCATION_DECK,0,1,nil))
or (ct==6 and Duel.IsExistingMatchingCard(c68957925.desfilter,tp,0,LOCATION_MZONE,1,nil)) end
if ct==3 then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1500)
elseif ct==4 then
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2000)
elseif ct==5 then
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
elseif ct==6 then
local g=Duel.GetMatchingGroup(c68957925.desfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
end
function c68957925.spfilter(c,e,tp)
return c:IsAttackAbove(2500) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c68957925.desfilter(c)
return c:IsFaceup() and c:IsAttackBelow(3000)
end
function c68957925.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroup(c68957925.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil):GetClassCount(Card.GetAttribute)
local g1=Duel.GetMatchingGroup(c68957925.filter,tp,LOCATION_MZONE,0,nil)
if ct==1 and g1:GetCount()>0 then
local tc1=g1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc1:RegisterEffect(e1)
tc1=g1:GetNext()
end
end
local g2=Duel.GetMatchingGroup(c68957925.filter,tp,0,LOCATION_MZONE,nil)
if ct==2 and g2:GetCount()>0 then
Duel.BreakEffect()
local tc2=g2:GetFirst()
while tc2 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc2:RegisterEffect(e1)
tc2=g2:GetNext()
end
end
if ct==3 then
Duel.BreakEffect()
Duel.Recover(tp,1500,REASON_EFFECT)
end
if ct==4 then
Duel.BreakEffect()
Duel.Damage(1-tp,2000,REASON_EFFECT)
end
local g3=Duel.GetMatchingGroup(c68957925.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ct==5 and g3:GetCount()>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g3:Select(tp,1,1,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
local g4=Duel.GetMatchingGroup(c68957925.desfilter,tp,0,LOCATION_MZONE,nil)
if ct==6 and g4:GetCount()>0 then
Duel.BreakEffect()
Duel.Destroy(g4,REASON_EFFECT)
end
end
--アストラグールズ
function c69170403.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69170403,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c69170403.sptg)
e1:SetOperation(c69170403.spop)
c:RegisterEffect(e1)
--dice
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69170403,1))
e2:SetCategory(CATEGORY_DICE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c69170403.dctg)
e2:SetOperation(c69170403.dcop)
c:RegisterEffect(e2)
end
function c69170403.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end
function c69170403.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c69170403.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c69170403.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c69170403.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c69170403.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local fid=c:GetFieldID()
tc:RegisterFlagEffect(69170403,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetCountLimit(1)
e3:SetLabel(fid)
e3:SetLabelObject(tc)
e3:SetCondition(c69170403.rmcon)
e3:SetOperation(c69170403.rmop)
Duel.RegisterEffect(e3,tp)
end
Duel.SpecialSummonComplete()
end
function c69170403.rmcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(69170403)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
function c69170403.rmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetLabelObject(),POS_FACEUP,REASON_EFFECT)
end
function c69170403.dcfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1)
end
function c69170403.dctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c69170403.dcfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_DICE,nil,0,tp,1)
end
function c69170403.dcop(e,tp,eg,ep,ev,re,r,rp)
local dc=Duel.TossDice(tp,1)
local g=Duel.GetMatchingGroup(c69170403.dcfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_CHANGE_LEVEL_FINAL)
e1:SetValue(dc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
--ペア・ルック
function c94446564.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c94446564.target)
e1:SetOperation(c94446564.activate)
c:RegisterEffect(e1)
end
function c94446564.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local g1=Duel.GetDecktopGroup(tp,1)
local tc1=g1:GetFirst()
local g2=Duel.GetDecktopGroup(1-tp,1)
local tc2=g2:GetFirst()
return tc1 and tc2 and tc1:IsAbleToRemove() and tc2:IsAbleToRemove() and tc1:IsAbleToHand() and tc2:IsAbleToHand()
end
end
function c94446564.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)==0 or Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)==0 then return end
Duel.ConfirmDecktop(tp,1)
Duel.ConfirmDecktop(1-tp,1)
local g1=Duel.GetDecktopGroup(tp,1)
local tc1=g1:GetFirst()
local g2=Duel.GetDecktopGroup(1-tp,1)
local tc2=g2:GetFirst()
if bit.band(tc1:GetType(),0x7)==bit.band(tc2:GetType(),0x7) then
Duel.DisableShuffleCheck()
Duel.SendtoHand(tc1,nil,REASON_EFFECT)
Duel.SendtoHand(tc2,nil,REASON_EFFECT)
Duel.ShuffleHand(tp)
Duel.ShuffleHand(1-tp)
else
Duel.DisableShuffleCheck()
Duel.Remove(tc1,POS_FACEUP,REASON_EFFECT)
Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)
end
end
--レイン・ボーズ
function c95568112.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--atk
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(95568112,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetCondition(c95568112.atkcon1)
e1:SetTarget(c95568112.atktg1)
e1:SetOperation(c95568112.atkop1)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c95568112.atkcon2)
e2:SetValue(c95568112.atkval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetCondition(c95568112.defcon)
c:RegisterEffect(e3)
--to defense
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_PHASE+PHASE_BATTLE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetCondition(c95568112.poscon)
e4:SetOperation(c95568112.posop)
c:RegisterEffect(e4)
--pendulum
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(95568112,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_DELAY)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c95568112.pencon)
e5:SetTarget(c95568112.pentg)
e5:SetOperation(c95568112.penop)
c:RegisterEffect(e5)
end
function c95568112.atkcon1(e,tp,eg,ep,ev,re,r,rp)
return math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))>0
end
function c95568112.atktg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c95568112.atkop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
local atk=math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))
if tc:IsFaceup() and tc:IsRelateToEffect(e) and atk>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk*100)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
function c95568112.atkcon2(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function c95568112.atkval(e,c)
local tp=c:GetControler()
return math.abs(Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)-Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA))*200
end
function c95568112.defcon(e)
return Duel.GetTurnPlayer()~=e:GetHandlerPlayer()
end
function c95568112.poscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackedCount()>0
end
function c95568112.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsAttackPos() then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE)
end
end
function c95568112.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function c95568112.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c95568112.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
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