Commit 4419fcf8 authored by mercury233's avatar mercury233

update new cards

parent 84c97021
#created by ...
#main
100200217
101109026
101109028
101109030
101109077
101109067
101109029
100427030
......@@ -31,6 +36,7 @@
100284002
100284003
#extra
100344051
100289001
100427034
100427035
......
......@@ -2,3 +2,4 @@
!counter 0x15f 指示物(逐渐削减的生命)
!setname 0x27f 翼侠 ウィングマン
!setname 0x281 春化精 春化精
!setname 0x282 悠悠 もけもけ
--エルロン
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_HAND+LOCATION_MZONE)
e1:SetCountLimit(1,id)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--Atk up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(400)
e2:SetCondition(s.atkcon)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,id)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup() and c:IsSetCard(0x1115)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.filter(chkc) and chkc~=c end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and e:GetHandler():CheckUniqueOnField(tp)
and Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,0,1,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,c)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if c:IsLocation(LOCATION_MZONE) and c:IsFacedown() then return end
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or tc:IsFacedown()
or not tc:IsRelateToEffect(e) or not c:CheckUniqueOnField(tp) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(s.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.atkcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x1115)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
function s.tgfilter(c)
return c:IsSetCard(0x115) and c:IsType(TYPE_SPELL) and c:IsAbleToGrave()
end
function s.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--究極宝玉神 レインボー・ドラゴン オーバー・ドライブ
--Script by mercury233
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x2034),aux.FilterBoolFunction(Card.IsFusionSetCard,0x1034),7,true)
aux.AddContactFusionProcedure(c,s.cfilter,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--cannot special summon
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(7000)
e1:SetCondition(s.atkcon)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TODECK+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCost(s.tdcost)
e2:SetTarget(s.tdtg)
e2:SetOperation(s.tdop)
c:RegisterEffect(e2)
--
if not s.global_flag then
s.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(s.regop)
Duel.RegisterEffect(ge1,0)
end
end
function s.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsSetCard(0x2034) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),id,0,0,0)
end
end
end
function s.cfilter(c,fc)
local tp=fc:GetControler()
return c:IsFusionSetCard(0x2034,0x1034) and c:IsAbleToRemoveAsCost() and Duel.GetFlagEffect(tp,id)>0
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x1034)
end
function s.atkcon(e)
local tp=e:GetHandlerPlayer()
local g=Duel.GetMatchingGroup(s.atkfilter,tp,LOCATION_REMOVED,0,nil)
return g:GetClassCount(Card.GetCode)>=7
end
function s.tdcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetBattledGroupCount()==0 and c:IsReleasable() end
Duel.Release(c,REASON_COST)
end
function s.spfilter(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x1034) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,c)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,#g,0,0)
end
function s.tdop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)>0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_REMOVED,0,1,ft,nil,e,tp)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
end
end
--赤しゃりの軍貫
--
--Script by Trishula9
function c101109026.initial_effect(c)
--change name
aux.EnableChangeCode(c,24639891,LOCATION_HAND+LOCATION_DECK+LOCATION_MZONE+LOCATION_GRAVE)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109026)
e1:SetCost(c101109026.spcost)
e1:SetTarget(c101109026.sptg)
e1:SetOperation(c101109026.spop)
c:RegisterEffect(e1)
end
function c101109026.cfilter(c)
return c:IsCode(24639891) and not c:IsPublic()
end
function c101109026.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109026.cfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c101109026.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c101109026.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101109026.filter(c,e,tp,oc)
return c:IsSetCard(0x166) and not c:IsCode(24639891) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c101109026.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,e,tp,oc,c)
end
function c101109026.xyzfilter(c,e,tp,oc,mc)
return c:IsType(TYPE_XYZ) and aux.IsCodeListed(c,mc:GetCode())
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_XYZ,tp,false,false)
and oc:IsCanBeXyzMaterial(c) and mc:IsCanBeXyzMaterial(c)
and Duel.GetLocationCountFromEx(tp,tp,Group.FromCards(oc,mc),c)>0
and aux.MustMaterialCheck(Group.FromCards(oc,mc),tp,EFFECT_MUST_BE_XMATERIAL)
end
function c101109026.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local mg=Duel.GetMatchingGroup(c101109026.filter,tp,LOCATION_DECK,0,nil,e,tp,c)
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.IsPlayerCanSpecialSummonCount(tp,2)
and mg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101109026,0)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=mg:Select(tp,1,1,nil)
local sc=sg:GetFirst()
Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_DISABLE_EFFECT)
sc:RegisterEffect(e2)
Duel.RaiseEvent(e:GetHandler(),EVENT_ADJUST,nil,0,PLAYER_NONE,PLAYER_NONE,0)
local g=Group.FromCards(c,sc)
if g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)<2 then return end
local xyzg=Duel.GetMatchingGroup(c101109026.xyzfilter,tp,LOCATION_EXTRA,0,nil,e,tp,c,sc)
if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
xyz:SetMaterial(g)
Duel.Overlay(xyz,g)
Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
xyz:CompleteProcedure()
end
end
end
--斬機サーキュラー
--
--Script by Trishula9
function c101109028.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101109028)
e1:SetCost(c101109028.spcost)
e1:SetTarget(c101109028.sptg)
e1:SetOperation(c101109028.spop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101109028+100)
e2:SetCondition(c101109028.thcon)
e2:SetTarget(c101109028.thtg)
e2:SetOperation(c101109028.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function c101109028.costfilter(c)
return c:IsSetCard(0x132) and c:IsType(TYPE_MONSTER) and not c:IsCode(101109028) and c:IsAbleToGraveAsCost()
end
function c101109028.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109028.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101109028.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c101109028.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101109028.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c101109028.checkop)
Duel.RegisterEffect(e1,tp)
--cannot announce
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c101109028.atkcon)
e2:SetTarget(c101109028.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
function c101109028.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,101109028)~=0 then return end
local fid=eg:GetFirst():GetFieldID()
Duel.RegisterFlagEffect(tp,101109028,RESET_PHASE+PHASE_END,0,1)
e:GetLabelObject():SetLabel(fid)
end
function c101109028.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),101109028)>0
end
function c101109028.atktg(e,c)
return c:GetFieldID()~=e:GetLabel()
end
function c101109028.cfilter(c,tp)
return c:IsSetCard(0x132) and c:IsControler(tp) and c:IsFaceup()
end
function c101109028.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101109028.cfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c101109028.thfilter(c)
return c:IsSetCard(0x132) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101109028.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101109028.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109028.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109028.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--はぐれ・もけもけ
--
--Script by Trishula9
function c101109030.initial_effect(c)
--change name
aux.EnableChangeCode(c,27288416,LOCATION_MZONE+LOCATION_GRAVE)
--normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
e1:SetValue(TYPE_NORMAL)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_REMOVE_TYPE)
e2:SetValue(TYPE_EFFECT)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCost(c101109030.thcost)
e3:SetTarget(c101109030.thtg)
e3:SetOperation(c101109030.thop)
c:RegisterEffect(e3)
end
function c101109030.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c101109030.thfilter(c)
return not c:IsCode(101109030) and c:IsSetCard(0x282) and c:IsAbleToHand()
end
function c101109030.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c101109030.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101109030.thop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101109030.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--A・∀・TT
function c101109077.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCost(c101109077.cost)
e1:SetTarget(c101109077.target)
e1:SetOperation(c101109077.operation)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_POSITION+CATEGORY_LEAVE_GRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101109077)
e2:SetCondition(c101109077.stcon)
e2:SetTarget(c101109077.sttg)
e2:SetOperation(c101109077.stop)
c:RegisterEffect(e2)
--remove
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMING_CHAIN_END+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101109077)
e3:SetCondition(c101109077.rmcon)
e3:SetTarget(c101109077.rmtg)
e3:SetOperation(c101109077.rmop)
c:RegisterEffect(e3)
end
function c101109077.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local c=e:GetHandler()
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_REMAIN_FIELD)
e1:SetProperty(EFFECT_FLAG_OATH+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_CHAIN)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_DISABLED)
e2:SetOperation(c101109077.tgop)
e2:SetLabel(cid)
e2:SetReset(RESET_CHAIN)
Duel.RegisterEffect(e2,tp)
end
function c101109077.tgop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetChainInfo(ev,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return end
if e:GetOwner():IsRelateToChain(ev) then
e:GetOwner():CancelToGrave(false)
end
end
function c101109077.filter(c,tp)
return c:IsFaceup() and (c:IsSetCard(0x15b) or c:IsControler(1-tp))
end
function c101109077.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101109077.filter(chkc,tp) end
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.IsExistingTarget(c101109077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c101109077.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c101109077.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
Duel.Equip(tp,c,tc)
--Add Equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c101109077.eqlimit)
c:RegisterEffect(e1)
end
elseif c:IsRelateToEffect(e) and not c:IsStatus(STATUS_LEAVE_CONFIRMED) then
c:CancelToGrave(false)
end
end
function c101109077.eqlimit(e,c)
return c:IsSetCard(0x15b) or c:IsControler(1-e:GetHandlerPlayer())
end
function c101109077.stcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsControler(tp)
end
function c101109077.stfilter(c)
return c:IsSetCard(0x15c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
end
function c101109077.sttg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsCanChangePosition()
and Duel.IsExistingMatchingCard(c101109077.stfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,ec,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,LOCATION_GRAVE)
end
function c101109077.stop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
local g=Duel.GetMatchingGroup(c101109077.stfilter,tp,LOCATION_GRAVE,0,nil)
if ec and c:IsRelateToEffect(e)
and Duel.ChangePosition(ec,POS_FACEUP_DEFENSE,POS_FACEDOWN_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)~=0
and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SET)
local sg=g:Select(1-tp,1,1,nil)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
function c101109077.rmcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsControler(1-tp)
end
function c101109077.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ec=e:GetHandler():GetEquipTarget()
if chk==0 then return ec and ec:IsAbleToRemove(tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,ec,1,0,0)
end
function c101109077.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
if ec and c:IsRelateToEffect(e) and Duel.Remove(ec,0,REASON_EFFECT+REASON_TEMPORARY)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetLabelObject(ec)
e1:SetCountLimit(1)
e1:SetOperation(c101109077.retop)
Duel.RegisterEffect(e1,tp)
end
end
function c101109077.retop(e,tp,eg,ep,ev,re,r,rp)
Duel.ReturnToField(e:GetLabelObject())
end
--空母軍貫-しらうお型特務艦
function c21293424.initial_effect(c)
aux.AddCodeList(c,24639891,78362751)
--xyz summon
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--apply the effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(21293424,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,21293424)
e1:SetCondition(c21293424.effcon)
e1:SetTarget(c21293424.efftg)
e1:SetOperation(c21293424.effop)
c:RegisterEffect(e1)
--protection
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(c21293424.indescon)
e2:SetTarget(c21293424.indestg)
e2:SetValue(aux.indoval)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(c21293424.atkval)
c:RegisterEffect(e3)
end
function c21293424.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c21293424.thfilter(c)
return c:IsSetCard(0x166) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c21293424.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0
if chk==0 then return chk1 and Duel.IsPlayerCanDraw(tp,1)
or chk2 and Duel.IsExistingMatchingCard(c21293424.thfilter,tp,LOCATION_DECK,0,1,nil) end
e:SetCategory(0)
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
if chk2 then
e:SetCategory(e:GetCategory()|(CATEGORY_TOHAND+CATEGORY_SEARCH))
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c21293424.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,78362751)>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c21293424.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
end
function c21293424.indescon(e)
return Duel.IsExistingMatchingCard(Card.IsFaceup,e:GetHandlerPlayer(),LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c21293424.indestg(e,c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsSetCard(0x166)
end
function c21293424.atkval(e,c)
return c:GetBaseDefense()
end
--弩級軍貫-いくら型一番艦
function c75215744.initial_effect(c)
aux.AddCodeList(c,24639891,61027400)
--xyz procedure
aux.AddXyzProcedure(c,nil,4,2)
c:EnableReviveLimit()
--apply the effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(75215744,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,75215744)
e1:SetCondition(c75215744.effcon)
e1:SetTarget(c75215744.efftg)
e1:SetOperation(c75215744.effop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(75215744,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c75215744.descon)
e2:SetTarget(c75215744.destg)
e2:SetOperation(c75215744.desop)
c:RegisterEffect(e2)
end
function c75215744.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c75215744.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(0)
end
end
function c75215744.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,61027400)>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c75215744.descon(e,tp,eg,ep,ev,re,r,rp)
local rc=eg:GetFirst()
return ep~=tp and rc:IsControler(tp) and rc:IsSetCard(0x166) and rc:IsSummonLocation(LOCATION_EXTRA)
end
function c75215744.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c75215744.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 c94798725.initial_effect(c)
aux.AddCodeList(c,24639891,42377643)
--xyz summon
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
--apply the effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(94798725,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,94798725)
e1:SetCondition(c94798725.effcon)
e1:SetTarget(c94798725.efftg)
e1:SetOperation(c94798725.effop)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(94798725,1))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMING_BATTLE_START+TIMING_BATTLE_END)
e2:SetCountLimit(1)
e2:SetCondition(c94798725.discon)
e2:SetTarget(c94798725.distg)
e2:SetOperation(c94798725.disop)
c:RegisterEffect(e2)
end
function c94798725.effcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
end
function c94798725.efftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0
if chk==0 then return (chk1 and Duel.IsPlayerCanDraw(tp,1) or chk2) end
if chk1 then
e:SetCategory(CATEGORY_DRAW)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
else
e:SetCategory(0)
end
end
function c94798725.effop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chk1=c:GetMaterial():FilterCount(Card.IsCode,nil,24639891)>0
local chk2=c:GetMaterial():FilterCount(Card.IsCode,nil,42377643)>0
if chk1 then
Duel.Draw(tp,1,REASON_EFFECT)
end
if chk2 and c:IsRelateToEffect(e) then
Duel.BreakEffect()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
end
function c94798725.discon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
local turn=Duel.GetTurnPlayer()
return (turn==tp and (ph==PHASE_MAIN1 or ph==PHASE_MAIN2) or turn==1-tp and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE))
end
function c94798725.ctfilter(c)
return c:IsSummonLocation(LOCATION_EXTRA) and c:IsFaceup() and c:IsSetCard(0x166)
end
function c94798725.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ct=Duel.GetMatchingGroupCount(c94798725.ctfilter,tp,LOCATION_ONFIELD,0,nil)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and aux.NegateAnyFilter(chkc) end
if chk==0 then return ct>0 and Duel.IsExistingTarget(aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,aux.NegateAnyFilter,tp,0,LOCATION_ONFIELD,1,ct,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,g:GetCount(),0,0)
end
function c94798725.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
local tc=tg:GetFirst()
while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
tc=tg:GetNext()
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