Commit f20e7158 authored by mercury233's avatar mercury233

update scripts

parent 03de727f
...@@ -46,10 +46,10 @@ function c100200153.doperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -46,10 +46,10 @@ function c100200153.doperation(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
Duel.BreakEffect() Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD) Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end end
end end
function c100200153.spcondition(e,tp,eg,ep,ev,re,r,rp) function c100200153.spcondition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) and (e:GetHandler():IsReason(REASON_EFFECT) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) and (e:GetHandler():IsReason(REASON_EFFECT)
or (e:GetHandler():IsReason(REASON_COST) and re:IsHasType(~EFFECT_TYPE_FIELD))) or (e:GetHandler():IsReason(REASON_COST) and re:IsHasType(~EFFECT_TYPE_FIELD)))
end end
function c100200153.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) function c100200153.sptarget(e,tp,eg,ep,ev,re,r,rp,chk)
......
--デーモンの招来
--Beckoned Skull Archfiend
--Scripted by Eerie Code
function c100242301.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(70781052)
c:RegisterEffect(e1)
--cannot be target
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsCode,70781052))
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetCondition(c100242301.spcon)
e3:SetTarget(c100242301.sptg)
e3:SetOperation(c100242301.spop)
c:RegisterEffect(e3)
end
function c100242301.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and rp==1-tp and c:GetPreviousControler()==tp
end
function c100242301.spfilter(c,e,tp)
return c:IsCode(70781052) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100242301.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100242301.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c100242301.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 tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100242301.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
...@@ -76,7 +76,7 @@ end ...@@ -76,7 +76,7 @@ end
function c100243014.repfilter(c,tp) function c100243014.repfilter(c,tp)
return c:IsFaceup() and ((c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2b)) or c:IsSetCard(0x61)) return c:IsFaceup() and ((c:IsType(TYPE_MONSTER) and c:IsSetCard(0x2b)) or c:IsSetCard(0x61))
and c:IsOnField() and c:IsControler(tp) and c:IsOnField() and c:IsControler(tp)
and not c:IsReason(REASON_REPLACE) and (c:IsReason(REASON_BATTLE) or c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==1-tp) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end end
function c100243014.rmfilter(c) function c100243014.rmfilter(c)
return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return c:IsSetCard(0x2b) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
......
--タツネクロ
--Tatsunecro
--Scripted by mercury233
function c100307000.initial_effect(c)
--synchro custom
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL_CUSTOM)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c100307000.syncon)
e1:SetTarget(c100307000.syntg)
e1:SetValue(1)
e1:SetOperation(c100307000.synop)
c:RegisterEffect(e1)
--splimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetTargetRange(1,0)
e2:SetTarget(c100307000.splimit)
c:RegisterEffect(e2)
--hand synchro
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCondition(c100307000.syncon)
e3:SetCode(EFFECT_HAND_SYNCHRO)
e3:SetTargetRange(0,1)
c:RegisterEffect(e3)
end
function c100307000.synfilter(c,syncard,tuner,f)
return (c:IsFaceup() or c:IsLocation(LOCATION_HAND)) and c:IsCanBeSynchroMaterial(syncard,tuner) and (f==nil or f(c))
end
function c100307000.syncheck(c,g,mg,tp,lv,syncard,minc,maxc)
g:AddCard(c)
local ct=g:GetCount()
local res=c100307000.syngoal(g,tp,lv,syncard,minc,ct)
or (ct<maxc and mg:IsExists(c100307000.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc))
g:RemoveCard(c)
return res
end
function c100307000.syngoal(g,tp,lv,syncard,minc,ct)
return ct>=minc
and g:CheckWithSumEqual(Card.GetSynchroLevel,lv,ct,ct,syncard)
and Duel.GetLocationCountFromEx(tp,tp,g,syncard)>0
and g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)<=1
end
function c100307000.syncon(e)
return e:GetHandler():IsSummonType(SUMMON_TYPE_NORMAL)
end
function c100307000.syntg(e,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local tp=syncard:GetControler()
local lv=syncard:GetLevel()
if lv<=c:GetLevel() then return false end
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c100307000.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
return mg:IsExists(c100307000.syncheck,1,g,g,mg,tp,lv,syncard,minc,maxc)
end
function c100307000.synop(e,tp,eg,ep,ev,re,r,rp,syncard,f,min,max)
local minc=min+1
local maxc=max+1
local c=e:GetHandler()
local lv=syncard:GetLevel()
local g=Group.FromCards(c)
local mg=Duel.GetMatchingGroup(c100307000.synfilter,tp,LOCATION_MZONE+LOCATION_HAND,LOCATION_MZONE,c,syncard,c,f)
for i=1,maxc do
local cg=mg:Filter(c100307000.syncheck,g,g,mg,tp,lv,syncard,minc,maxc)
if cg:GetCount()==0 then break end
local minct=1
if c100307000.syngoal(g,tp,lv,syncard,minc,i) then
if not Duel.SelectYesNo(tp,210) then break end
minct=0
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SMATERIAL)
local sg=cg:Select(tp,minct,1,nil)
if sg:GetCount()==0 then break end
g:Merge(sg)
end
for tc in Auxiliary.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TO_GRAVE_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
tc:RegisterEffect(e1,true)
end
Duel.SetSynchroMaterial(g)
end
function c100307000.splimit(e,c)
return not c:IsRace(RACE_ZOMBIE)
end
...@@ -28,13 +28,20 @@ function c100307001.initial_effect(c) ...@@ -28,13 +28,20 @@ function c100307001.initial_effect(c)
end end
function c100307001.disrmcon(e,tp,eg,ep,ev,re,r,rp) function c100307001.disrmcon(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler() local c=re:GetHandler()
return c:IsRace(RACE_ZOMBIE) and not c:IsCode(100307001) local race=c:GetRace()
local loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_LOCATION)
if loc==LOCATION_HAND then race=c:GetOriginalRace() end
if loc==LOCATION_MZONE and not c:IsLocation(LOCATION_MZONE) then race=c:GetPreviousRaceOnField() end
return race==RACE_ZOMBIE and not c:IsCode(100307001)
end end
function c100307001.disrmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100307001.disrmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,100307001)==0 local b1=Duel.IsChainDisablable(ev) and Duel.GetFlagEffect(tp,100307001)==0
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil) local b2=Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil)
and Duel.GetFlagEffect(tp,100307001+100)==0 and Duel.GetFlagEffect(tp,100307001+100)==0
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end end
function c100307001.filter(c) function c100307001.filter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove() return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
function c100307023.initial_effect(c) function c100307023.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(35498188,0))
e1:SetCategory(CATEGORY_CONTROL) e1:SetCategory(CATEGORY_CONTROL)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
...@@ -15,8 +16,8 @@ function c100307023.initial_effect(c) ...@@ -15,8 +16,8 @@ function c100307023.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--set --set
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(35498188,1))
e2:SetCategory(CATEGORY_TODECK) e2:SetCategory(CATEGORY_TODECK)
e2:SetDescription(aux.Stringid(35498188,0))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100307023) e2:SetCountLimit(1,100307023)
......
--リターン・オブ・アンデット
--Return of Zombie
--Scripted by Eerie Code
function c100307034.initial_effect(c)
--banish and summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,100307034)
e1:SetTarget(c100307034.target)
e1:SetOperation(c100307034.activate)
c:RegisterEffect(e1)
--set
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TODECK)
e2:SetDescription(aux.Stringid(35498188,0))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,100307034+100)
e2:SetTarget(c100307034.settg)
e2:SetOperation(c100307034.setop)
c:RegisterEffect(e2)
end
function c100307034.rmfilter(c,e,tp)
local p=c:GetControler()
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToRemove()
and Duel.GetMZoneCount(p,c,p,LOCATION_REASON_TOFIELD)
and Duel.IsExistingMatchingCard(c100307034.spfilter,p,LOCATION_GRAVE,0,1,nil,e,tp,p)
end
function c100307034.spfilter(c,e,tp,p)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE,p)
end
function c100307034.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100307034.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,PLAYER_ALL,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,PLAYER_ALL,LOCATION_GRAVE)
end
function c100307034.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rc=Duel.SelectMatchingCard(tp,c100307034.rmfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp):GetFirst()
if rc and Duel.Remove(rc,POS_FACEUP,REASON_EFFECT)~=0 then
local p=rc:GetPreviousControler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100307034.spfilter),p,LOCATION_GRAVE,0,1,1,nil,e,tp,p)
if #g>0 then Duel.SpecialSummon(g,0,tp,p,false,false,POS_FACEUP_DEFENSE) end
end
end
function c100307034.setfilter(c)
return c:IsFaceup() and c:IsRace(RACE_ZOMBIE) and c:IsAbleToDeck()
end
function c100307034.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsSSetable()
and Duel.IsExistingMatchingCard(c100307034.setfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end
function c100307034.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c100307034.setfilter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 and Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0
and c:IsRelateToEffect(e) and c:IsSSetable() then
Duel.SSet(tp,c)
Duel.ConfirmCards(1-tp,c)
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+0x47e0000)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
end
end
--真紅眼の不屍竜
--Red-Eyes Zombie Necro Dragon
function c100307041.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--Atk up
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(c100307041.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DESTROYED)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100307041)
e3:SetCondition(c100307041.spcon)
e3:SetTarget(c100307041.sptg)
e3:SetOperation(c100307041.spop)
c:RegisterEffect(e3)
end
function c100307041.atkval(e,c)
return Duel.GetMatchingGroupCount(Card.IsRace,c:GetControler(),LOCATION_GRAVE+LOCATION_MZONE,LOCATION_GRAVE+LOCATION_MZONE,nil,RACE_ZOMBIE)*100
end
function c100307041.cfilter(c)
return c:IsRace(RACE_ZOMBIE)
end
function c100307041.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100307041.cfilter,1,nil)
end
function c100307041.spfilter(c,e,tp)
return c:IsRace(RACE_ZOMBIE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c100307041.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c100307041.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c100307041.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,aux.NecroValleyFilter(c100307041.spfilter),tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--アドヴェンデット・セイヴァー
--Advendread Savior
--Scripted by Eerie Code
function c100421001.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_ZOMBIE),2,2)
--code
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(4388680)
c:RegisterEffect(e1)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(100421001,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,100421001)
e2:SetTarget(c100421001.thtg)
e2:SetOperation(c100421001.thop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(100421001,1))
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,100421001+100)
e3:SetCondition(c100421001.atkcon)
e3:SetCost(c100421001.atkcost)
e3:SetOperation(c100421001.atkop)
c:RegisterEffect(e3)
end
c100421001.listed_names={4388680}
function c100421001.thfilter(c)
return c:IsSetCard(0x106) and c:IsAbleToHand()
end
function c100421001.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c100421001.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c100421001.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=Duel.SelectTarget(tp,c100421001.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,sg,sg:GetCount(),0,0)
end
function c100421001.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c100421001.atkcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc and bc:IsFaceup() and bc:IsRelateToBattle()
end
function c100421001.atkcfilter(c)
return c:IsRace(RACE_ZOMBIE) and c:IsAbleToGraveAsCost()
end
function c100421001.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100421001.atkcfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c100421001.atkcfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
e:SetLabel(tc:GetLevel())
end
function c100421001.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
local ct=e:GetLabel()*200
if c:IsFaceup() and c:IsRelateToBattle() and bc:IsFaceup() and bc:IsRelateToBattle() and ct>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-ct)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
bc:RegisterEffect(e1)
end
end
...@@ -84,7 +84,7 @@ function c100421020.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c100421020.discon(e,tp,eg,ep,ev,re,r,rp)
end end
function c100421020.discost(e,tp,eg,ep,ev,re,r,rp,chk) function c100421020.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x4a,1,REASON_COST) end if chk==0 then return Duel.IsCanRemoveCounter(tp,1,1,0x4a,1,REASON_COST) end
Duel.RemoveCounter(tp,1,1,0x50,1,REASON_COST) Duel.RemoveCounter(tp,1,1,0x4a,1,REASON_COST)
end end
function c100421020.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c100421020.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true 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