Commit 3cf0b7b0 authored by mercury233's avatar mercury233

rm

parent 7b2f0e1a
#created by ...
#main
101103000
101103081
101103082
101103086
101103087
101103088
101103089
101103090
101103091
101103092
101103093
101103094
101103095
101103096
101103097
101103098
100276001
100416027
100416028
......@@ -26,12 +10,8 @@
100416037
100416038
100416039
100275001
100274203
#extra
101103083
101103084
101103085
100416033
100416034
100416035
......
#The first line is used for comment
!counter 0x60 指示物(北极天熊北斗星)
!counter 0x61 指示物(岩战之试炼)
!victory 0x21 「混沌虚数No.1000 梦幻虚光神 原数天灵·原数天地」特殊胜利
!setname 0x261 北极天熊
!setname 0x262 源质兽
!setname 0x263 岩战
field/100416038.jpg

74.3 KB | W: | H:

field/100416038.jpg

155 KB | W: | H:

field/100416038.jpg
field/100416038.jpg
field/100416038.jpg
field/100416038.jpg
  • 2-up
  • Swipe
  • Onion skin
pics/100276001.jpg

90.8 KB | W: | H:

pics/100276001.jpg

88 KB | W: | H:

pics/100276001.jpg
pics/100276001.jpg
pics/100276001.jpg
pics/100276001.jpg
  • 2-up
  • Swipe
  • Onion skin
--あまびえさん
--Amabie-San
--Scripted by TOP
function c100275001.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(100275001,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100275001.condition)
e1:SetCost(c100275001.cost)
e1:SetTarget(c100275001.target)
e1:SetOperation(c100275001.operation)
c:RegisterEffect(e1)
end
function c100275001.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c100275001.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c100275001.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,PLAYER_ALL,300)
end
function c100275001.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Recover(tp,300,REASON_EFFECT)
Duel.Recover(1-tp,300,REASON_EFFECT)
end
--War Rock Mountain
--Scripted by Kohana Sonogami
function c101103000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103000+EFFECT_COUNT_CODE_OATH)
e1:SetOperation(c101103000.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103000,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,101103000)
e2:SetCondition(c101103000.spcon)
e2:SetTarget(c101103000.sptg)
e2:SetOperation(c101103000.spop)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(c101103000.reptg)
e3:SetValue(c101103000.repval)
e3:SetOperation(c101103000.repop)
c:RegisterEffect(e3)
end
function c101103000.thfilter(c)
return c:IsSetCard(0x263) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c101103000.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c101103000.thfilter,tp,LOCATION_DECK,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(101103000,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,sg)
end
end
function c101103000.cfilter1(c)
return c:IsFacedown() or not c:IsRace(RACE_WARRIOR)
end
function c101103000.spcon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(c101103000.cfilter1,tp,LOCATION_MZONE,0,1,nil)
end
function c101103000.cfilter2(c,code)
return c:IsFaceup() and c:IsCode(code)
end
function c101103000.spfilter(c,e,tp)
return c:IsSetCard(0x263) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c101103000.cfilter2,tp,LOCATION_ONFIELD,0,1,nil,c:GetCode())
end
function c101103000.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103000.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101103000.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103000.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103000.repfilter(c,tp)
return c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsRace(RACE_WARRIOR)
and c:IsControler(tp) and c:IsReason(REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c101103000.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGrave() and not c:IsStatus(STATUS_DESTROY_CONFIRMED)
and eg:IsExists(c101103000.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c101103000.repval(e,c)
return c101103000.repfilter(c,e:GetHandlerPlayer())
end
function c101103000.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT+REASON_REPLACE)
end
--Materiactor Gigadra
--Scripted by mallu11
function c101103081.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103081,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103081)
e1:SetCost(c101103081.spcost)
e1:SetTarget(c101103081.sptg)
e1:SetOperation(c101103081.spop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(1,0)
e2:SetTarget(c101103081.splimit)
c:RegisterEffect(e2)
end
function c101103081.costfilter(c,e,tp)
return c:IsDiscardable() and Duel.IsExistingMatchingCard(c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,c,e,tp,c:IsType(TYPE_NORMAL))
end
function c101103081.spfilter(c,e,tp,normal)
return (normal and c:IsSetCard(0x262) or c:IsLevel(3) and c:IsType(TYPE_NORMAL)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103081.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(100,0)
if chk==0 then return Duel.IsExistingMatchingCard(c101103081.costfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=Duel.SelectMatchingCard(tp,c101103081.costfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if sg:GetFirst():IsType(TYPE_NORMAL) then
e:SetLabel(100,1)
else
e:SetLabel(100,0)
end
Duel.SendtoGrave(sg,REASON_COST+REASON_DISCARD)
end
function c101103081.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local check,label=e:GetLabel()
if chk==0 then
e:SetLabel(0,0)
return check==100 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
e:SetLabel(0,label)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101103081.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local check,label=e:GetLabel()
local normal=label==1
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103081.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,normal)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c101103081.splimit(e,c,sump,sumtype,sumpos,targetp)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_XYZ)
end
--Raging Storm Dragon - Beaufort IX
--Scripted by mallu11
function c101103082.initial_effect(c)
c:EnableReviveLimit()
--disable
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103082,0))
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101103082)
e1:SetCondition(c101103082.discon)
e1:SetCost(c101103082.discost)
e1:SetTarget(c101103082.distg)
e1:SetOperation(c101103082.disop)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103082,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,101103082+100)
e2:SetTarget(c101103082.thtg)
e2:SetOperation(c101103082.thop)
c:RegisterEffect(e2)
end
function c101103082.discon(e,tp,eg,ep,ev,re,r,rp)
e:SetLabelObject(Duel.GetAttacker())
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c101103082.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c101103082.distg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return bc end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,bc,1,0,0)
end
function c101103082.disop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject()
if Duel.NegateAttack() and bc and bc:IsRelateToBattle() and bc:IsFaceup() and not bc:IsDisabled() then
Duel.NegateRelatedChain(bc,RESET_TURN_SET)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
bc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
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)
bc:RegisterEffect(e2)
end
end
function c101103082.thfilter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101103082.thtg(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(1-tp) and c101103082.thfilter(chkc) end
if chk==0 then return c:IsAbleToHand() and Duel.IsExistingTarget(c101103082.thfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101103082.thfilter,tp,0,LOCATION_MZONE,1,1,nil)
g:AddCard(c)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,2,0,0)
end
function c101103082.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or not tc:IsRelateToEffect(e) then return end
local rg=Group.FromCards(c,tc)
Duel.SendtoHand(rg,nil,REASON_EFFECT)
end
--Coordius the Triphasic Dealmon
--Scripted by mallu11
function c101103083.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcMix(c,false,true,c101103083.fusfilter1,c101103083.fusfilter2,c101103083.fusfilter3)
--reg
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCondition(c101103083.regcon)
e1:SetOperation(c101103083.regop)
c:RegisterEffect(e1)
end
c101103083.material_type=TYPE_SYNCHRO
function c101103083.fusfilter1(c)
return c:IsFusionType(TYPE_SYNCHRO)
end
function c101103083.fusfilter2(c)
return c:IsFusionType(TYPE_XYZ)
end
function c101103083.fusfilter3(c)
return c:IsFusionType(TYPE_LINK)
end
function c101103083.regcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function c101103083.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY+CATEGORY_ATKCHANGE+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_NO_TURN_RESET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101103083)
e1:SetTarget(c101103083.target)
e1:SetOperation(c101103083.operation)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c101103083.thfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end
function c101103083.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLP(tp)>=2000 end
e:GetHandler():RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(101103083,0))
end
function c101103083.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(tp)<2000 then return end
local c=e:GetHandler()
local b1=Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101103083.thfilter),tp,LOCATION_GRAVE,0,1,nil)
local b2=Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,3,nil)
local b3=c:IsRelateToEffect(e) and c:IsFaceup()
local pay=0
if b1 then pay=pay+2000 end
if b2 and Duel.GetLP(tp)-pay>=2000 then pay=pay+2000 end
if b3 and Duel.GetLP(tp)-pay>=2000 then pay=pay+2000 end
if pay<2000 then return end
local m=math.floor(pay/2000)
local t={}
for i=1,m do
t[i]=i*2000
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
if Duel.GetLP(tp)<=0 then return end
m=math.floor(ac/2000)
local g=nil
if b1 and (m>2 or (m>1 and not (b2 and b3)) or m>0 and (not (b2 or b3) or Duel.SelectYesNo(tp,aux.Stringid(101103083,1)))) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101103083.thfilter),tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
m=m-1
end
if b2 and (m>1 or m>0 and (not b3 or Duel.SelectYesNo(tp,aux.Stringid(101103083,2)))) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_ONFIELD,3,3,nil)
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
m=m-1
end
if b3 and m>0 then
Duel.BreakEffect()
local atk=math.floor(math.abs(Duel.GetLP(tp)-Duel.GetLP(1-tp))/2)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_CANNOT_ATTACK)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetTargetRange(LOCATION_MZONE,0)
e0:SetTarget(c101103083.ftarget)
e0:SetLabel(c:GetFieldID())
e0:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e0,tp)
end
end
function c101103083.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
--Materiactor Gigaboros
--Scripted by mallu11
function c101103084.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,3,2,nil,nil,99)
--atk/def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101103084.adval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--material
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101103084,0))
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101103084)
e3:SetCost(c101103084.matcost)
e3:SetTarget(c101103084.mattg)
e3:SetOperation(c101103084.matop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101103084,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e4:SetCountLimit(1,101103084+100)
e4:SetCondition(c101103084.thcon)
e4:SetTarget(c101103084.thtg)
e4:SetOperation(c101103084.thop)
c:RegisterEffect(e4)
end
function c101103084.adval(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_HAND,0)*500
end
function c101103084.matcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function c101103084.matfilter(c)
return c:IsSetCard(0x262) and c:IsType(TYPE_MONSTER) and c:IsCanOverlay()
end
function c101103084.mattg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) and Duel.IsExistingMatchingCard(c101103084.matfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c101103084.matop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and not c:IsImmuneToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local g=Duel.SelectMatchingCard(tp,c101103084.matfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.Overlay(c,g)
end
end
end
function c101103084.thcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return Duel.GetTurnPlayer()==1-tp
and (ph==PHASE_MAIN1 or (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE) or ph==PHASE_MAIN2)
end
function c101103084.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=e:GetHandler():GetOverlayGroup()
if chk==0 then return g:IsExists(Card.IsAbleToHand,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_OVERLAY)
end
function c101103084.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
local g=c:GetOverlayGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=g:FilterSelect(tp,Card.IsAbleToHand,1,1,nil)
if tg:GetCount()>0 then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
end
end
end
--Steel Star Regulator
--Scripted by TanakaKotoha
function c101103085.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_LINK)),3,3)
c:EnableReviveLimit()
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c101103085.atkcon)
e1:SetOperation(c101103085.atkop)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103085,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101103085)
e2:SetRange(LOCATION_MZONE)
e2:SetTarget(c101103085.destg)
e2:SetOperation(c101103085.desop)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(c101103085.valcheck)
c:RegisterEffect(e4)
e4:SetLabelObject(e1)
end
function c101103085.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c101103085.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=c:GetMaterial()
local atk=0
local tc=g:GetFirst()
while tc do
local lk
if tc:IsType(TYPE_XYZ) then
lk=tc:GetOriginalRank()
else
lk=tc:GetOriginalLevel()
end
atk=atk+lk
tc=g:GetNext()
end
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_DISABLE)
c:RegisterEffect(e1)
if e:GetLabel()==1 then
c:RegisterFlagEffect(101103085,RESET_EVENT+RESETS_STANDARD,0,1)
end
end
function c101103085.desfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk) and not c:IsType(TYPE_LINK)
end
function c101103085.destg(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(1-tp) and c101103085.desfilter(chkc,c:GetAttack()) end
if chk==0 then return Duel.IsExistingTarget(c101103085.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101103085.desfilter,tp,0,LOCATION_MZONE,1,1,nil,c:GetAttack())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c101103085.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.Destroy(tc,REASON_EFFECT)~=0 and e:GetHandler():GetFlagEffect(101103085)~=0 then
Duel.BreakEffect()
local atk=tc:GetBaseAttack()
if atk<0 then atk=0 end
Duel.Damage(1-tp,math.ceil(atk/2),REASON_EFFECT)
end
end
end
function c101103085.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsLinkType,1,nil,TYPE_XYZ) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
--Breath of Acclamation
--Scripted by mallu11
function c101103086.initial_effect(c)
aux.AddRitualProcEqual2(c,c101103086.ritual_filter)
end
function c101103086.ritual_filter(c)
return c:IsType(TYPE_RITUAL) and c:IsAttribute(ATTRIBUTE_WIND)
end
--Greater Polymerization
--Scripted by mallu11
function c101103087.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101103087.target)
e1:SetOperation(c101103087.activate)
c:RegisterEffect(e1)
end
function c101103087.filter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c101103087.fcheck(tp,sg,fc)
return sg:GetCount()>=3
end
function c101103087.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
aux.FCheckAdditional=c101103087.fcheck
local res=Duel.IsExistingMatchingCard(c101103087.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c101103087.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,chkf)
end
end
aux.FCheckAdditional=nil
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103087.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(aux.NOT(Card.IsImmuneToEffect),nil,e)
aux.FCheckAdditional=c101103087.fcheck
local sg1=Duel.GetMatchingGroup(c101103087.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c101103087.filter,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
local res=false
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
Auxiliary.FCheckAdditional=c101103087.fcheck
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
Auxiliary.FCheckAdditional=nil
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
res=true
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg2,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
res=true
end
if res then
tc:CompleteProcedure()
--cannot be destroyed
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1,true)
--pierce
local e2=Effect.CreateEffect(tc)
e2:SetDescription(aux.Stringid(101103087,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_PIERCE)
e2:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
if not tc:IsType(TYPE_EFFECT) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ADD_TYPE)
e3:SetValue(TYPE_EFFECT)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3,true)
end
end
end
aux.FCheckAdditional=nil
end
--Reinforcement of the Army's Troops
--Scripted by TanakaKotoha
function c101103088.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103088,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,101103088)
e2:SetCondition(c101103088.spcon)
e2:SetTarget(c101103088.sptg)
e2:SetOperation(c101103088.spop)
c:RegisterEffect(e2)
end
function c101103088.spcon(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsControler(1-tp) then tc=Duel.GetAttackTarget() end
return tc and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRace(RACE_WARRIOR)
end
function c101103088.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103088.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103088.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c101103088.spop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) 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,c101103088.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--Psychic Eraser Laser
--Scripted by mallu11
function c101103089.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103089+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101103089.target)
e1:SetOperation(c101103089.operation)
c:RegisterEffect(e1)
end
function c101103089.filter(c)
return c:GetSummonLocation()==LOCATION_EXTRA and c:IsAbleToGrave()
end
function c101103089.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101103089.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,0)
end
function c101103089.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103089.filter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.HintSelection(g)
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) and tc:IsType(TYPE_MONSTER) then
local atk=tc:GetBaseAttack()
local def=tc:GetBaseDefense()
local rec=atk>=def and atk or def
if rec>0 then
Duel.BreakEffect()
Duel.Recover(1-tp,rec,REASON_EFFECT)
end
end
end
end
--Synchro Transmission
--Scripted by TanakaKotoha
function c101103090.initial_effect(c)
--synchro effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,101103090)
e1:SetCondition(c101103090.sccon)
e1:SetTarget(c101103090.sctg)
e1:SetOperation(c101103090.scop)
c:RegisterEffect(e1)
--to deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOEXTRA+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101103190)
e2:SetCondition(c101103090.tdcon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c101103090.tdtg)
e2:SetOperation(c101103090.tdop)
c:RegisterEffect(e2)
end
function c101103090.sccon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function c101103090.sctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local mg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
return Duel.IsExistingMatchingCard(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,1,nil,nil,mg)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c101103090.scop(e,tp,eg,ep,ev,re,r,rp)
local mg=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_MZONE,0,nil,TYPE_MONSTER)
local g=Duel.GetMatchingGroup(Card.IsSynchroSummonable,tp,LOCATION_EXTRA,0,nil,nil,mg)
if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SynchroSummon(tp,sg:GetFirst(),nil,mg)
end
end
function c101103090.tdcon(e,tp,eg,ep,ev,re,r,rp)
return aux.exccon(e) and Duel.GetTurnPlayer()==tp and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101103090.tdfilter(c)
return c:IsType(TYPE_SYNCHRO) and c:IsAbleToExtra()
end
function c101103090.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103090.tdfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101103090.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101103090.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103090.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoDeck(tc,nil,0,REASON_EFFECT)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
end
--Pendulum Encore
--Script by mercury233
--not fully implemented
function c101103091.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:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,101103091+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101103091.condition)
e1:SetCost(c101103091.cost)
e1:SetTarget(c101103091.target)
e1:SetOperation(c101103091.activate)
e1:SetLabel(0)
c:RegisterEffect(e1)
end
function c101103091.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==1-tp
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c101103091.check(e,tp,exc)
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return false end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_EXTRA,0,exc,TYPE_PENDULUM)
if #g==0 then return false end
local pcon=aux.PendCondition()
return pcon(e,lpz,g)
end
function c101103091.cfilter(c,e,tp)
return c:IsDiscardable() and c101103091.check(e,tp,c)
end
function c101103091.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
e:SetLabel(100)
if not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,nil,TYPE_PENDULUM)
or Duel.GetFieldGroupCount(tp,LOCATION_PZONE,0)<2 then return false end
return Duel.IsExistingMatchingCard(c101103091.cfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
end
e:SetLabel(0)
Duel.DiscardHand(tp,c101103091.cfilter,1,1,REASON_COST+REASON_DISCARD,nil,e,tp)
end
function c101103091.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()==100 then
e:SetLabel(0)
return true
end
return c101103091.check(e,tp,nil)
end
e:SetLabel(0)
end
function c101103091.activate(e,tp,eg,ep,ev,re,r,rp)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetTargetRange(LOCATION_PZONE,0)
e1:SetValue(1)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetValue(aux.indsval)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCountLimit(1)
e3:SetOperation(c101103091.retop)
Duel.RegisterEffect(e3,tp)
end
local lpz=Duel.GetFieldCard(tp,LOCATION_PZONE,0)
if lpz==nil then return end
local g=Duel.GetMatchingGroup(Card.IsType,tp,LOCATION_HAND+LOCATION_EXTRA,0,nil,TYPE_PENDULUM)
if #g==0 then return end
--the summon should be done after the chain end
local sg=Group.CreateGroup()
local pop=aux.PendOperation()
pop(e,tp,eg,ep,ev,re,r,rp,lpz,sg,g)
Duel.SpecialSummon(sg,SUMMON_TYPE_PENDULUM,tp,tp,false,false,POS_FACEUP)
end
function c101103091.retop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
--Underdog
--Scripted by mallu11
function c101103092.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DISABLE)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(c101103092.disable)
c:RegisterEffect(e2)
end
function c101103092.disable(e,c)
return (c:IsType(TYPE_EFFECT) or bit.band(c:GetOriginalType(),TYPE_EFFECT)==TYPE_EFFECT) and c:IsControler(1-Duel.GetTurnPlayer())
end
--War Rock Fortia
--Scripted by Kohana Sonogami
function c101103093.initial_effect(c)
--tohand & atkchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103093,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
e1:SetCountLimit(1,101103093)
e1:SetTarget(c101103093.thtg)
e1:SetOperation(c101103093.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103093,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103093+100)
e2:SetCondition(c101103093.spcon)
e2:SetTarget(c101103093.sptg)
e2:SetOperation(c101103093.spop)
c:RegisterEffect(e2)
end
function c101103093.thfilter(c)
return c:IsSetCard(0x263) and not c:IsCode(101103093) and c:IsAbleToHand()
end
function c101103093.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103093.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (c101103093.check(Duel.GetAttacker(),tp) or c101103093.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103093.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101103093.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103093.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101103093.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g)
if Duel.IsExistingMatchingCard(c101103093.atkfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103093.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
end
end
function c101103093.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103093.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103093.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103093.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101103093.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103093.spfilter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--War Rock Gactos
--Scripted by Kohana Sonogami
function c101103094.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103094,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c101103094.spcon1)
e1:SetTarget(c101103094.sptg1)
e1:SetOperation(c101103094.spop1)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103094,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCountLimit(1,101103094)
e2:SetCondition(c101103094.spcon2)
e2:SetTarget(c101103094.sptg2)
e2:SetOperation(c101103094.spop2)
c:RegisterEffect(e2)
end
function c101103094.cfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsControler(tp)
end
function c101103094.spcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103094.cfilter,1,nil,tp)
end
function c101103094.sptg1(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 c101103094.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c101103094.spcon2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return rp==1-tp and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsReason(REASON_EFFECT)
end
function c101103094.spfilter2(c,e,tp)
return c:IsLevelAbove(5) and c:IsSetCard(0x263) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103094.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101103094.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_HAND)
end
function c101103094.spop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101103094.spfilter2,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--War Rock Orpis
--Scripted by Kohana Sonogami
function c101103095.initial_effect(c)
--normal summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103095,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c101103095.ntcon)
e1:SetValue(1)
c:RegisterEffect(e1)
--tograve & atkchange
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103095,1))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_BATTLED)
e1:SetCountLimit(1,101103095)
e1:SetTarget(c101103095.tgtg)
e1:SetOperation(c101103095.tgop)
c:RegisterEffect(e1)
end
function c101103095.cfilter(c)
return c:IsFacedown() or not c:IsRace(RACE_WARRIOR)
end
function c101103095.ntcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
return minc==0 and c:IsLevelAbove(5) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and (Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0 or not Duel.IsExistingMatchingCard(c101103095.cfilter,tp,LOCATION_MZONE,0,1,nil))
end
function c101103095.tgfilter(c)
return c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR) and c:IsAbleToGrave() and not c:IsCode(101103095)
end
function c101103095.check(c,tp)
return c and c:IsControler(tp) and c:IsAttribute(ATTRIBUTE_EARTH) and c:IsRace(RACE_WARRIOR)
end
function c101103095.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (c101103095.check(Duel.GetAttacker(),tp) or c101103095.check(Duel.GetAttackTarget(),tp))
and Duel.IsExistingMatchingCard(c101103095.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c101103095.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103095.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101103095.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.BreakEffect()
local sg=Duel.GetMatchingGroup(c101103095.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=sg:GetFirst()
for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
end
--War Rock Skyler
--Scripted by Kohana Sonogami
function c101103096.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c101103096.val)
c:RegisterEffect(e1)
--special summon & atkchange
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103096,0))
e2:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101103096)
e2:SetCondition(c101103096.spcon)
e2:SetTarget(c101103096.sptg)
e2:SetOperation(c101103096.spop)
c:RegisterEffect(e2)
if not c101103096.global_check then
c101103096.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c101103096.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101103096.check(c)
return c and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101103096.checkop(e,tp,eg,ep,ev,re,r,rp)
local c0,c1=Duel.GetBattleMonster(0)
if c101103096.check(c0) then
Duel.RegisterFlagEffect(0,101103096,RESET_PHASE+PHASE_END,0,1)
end
if c101103096.check(c1) then
Duel.RegisterFlagEffect(1,101103096,RESET_PHASE+PHASE_END,0,1)
end
end
function c101103096.val(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),0,LOCATION_MZONE)*100
end
function c101103096.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101103096)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103096.spfilter(c,e,tp)
return c:IsLevelAbove(5) and c:IsRace(RACE_WARRIOR) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101103096.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101103096.spfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c101103096.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c101103096.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c101103096.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103096.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
local g=Duel.GetMatchingGroup(c101103096.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_DIRECT_ATTACK)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsLevelBelow,5))
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
--War Rock Bashileos
--Scripted by Kohana Sonogami
function c101103097.initial_effect(c)
--direct attack
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101103097,1))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101103097)
e1:SetCondition(c101103097.dracon)
e1:SetOperation(c101103097.draop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103097,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e2:SetCountLimit(1,101103097+100)
e2:SetCondition(c101103097.spcon)
e2:SetTarget(c101103097.sptg)
e2:SetOperation(c101103097.spop)
c:RegisterEffect(e2)
if not c101103097.global_check then
c101103097.global_check=true
local ge1=Effect.GlobalEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c101103097.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function c101103097.check(c)
return c and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c101103097.checkop(e,tp,eg,ep,ev,re,r,rp)
local c0,c1=Duel.GetBattleMonster(0)
if c101103097.check(c0) then
Duel.RegisterFlagEffect(0,101103097,RESET_PHASE+PHASE_END,0,1)
end
if c101103097.check(c1) then
Duel.RegisterFlagEffect(1,101103097,RESET_PHASE+PHASE_END,0,1)
end
end
function c101103097.dracon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,101103097)>0
and (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c101103097.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0x263)
end
function c101103097.draop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DIRECT_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local g=Duel.GetMatchingGroup(c101103097.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetValue(200)
tc:RegisterEffect(e1)
end
end
function c101103097.spfilter(c,tp)
return c:IsPreviousControler(tp) and c:IsSetCard(0x253) and c:IsType(TYPE_MONSTER)
end
function c101103097.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101103097.spfilter,1,nil,tp)
end
function c101103097.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c101103097.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1,true)
end
end
--War Rock Ordeal
--Scripted by Kohana Sonogami
function c101103098.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
c:EnableCounterPermit(0x61,LOCATION_SZONE)
c:SetUniqueOnField(1,0,101103098)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c101103098.activate)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101103098,0))
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c101103098.drcon)
e2:SetTarget(c101103098.drtg)
e2:SetOperation(c101103098.drop)
c:RegisterEffect(e2)
end
function c101103098.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:AddCounter(0x61,3)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_SELF_TOGRAVE)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(c101103098.sdcon)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1)
end
function c101103098.sdcon(e)
return e:GetHandler():GetCounter(0x61)==0
end
function c101103098.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
local at=tc:GetBattleTarget()
return eg:GetCount()==1 and tc:IsLocation(LOCATION_GRAVE) and tc:IsReason(REASON_BATTLE)
and at:IsRelateToBattle() and at:IsControler(tp) and at:IsSetCard(0x263)
end
function c101103098.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsCanRemoveCounter(tp,0x61,1,REASON_EFFECT) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101103098.drop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():RemoveCounter(tp,0x61,1,REASON_EFFECT) then
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
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