Commit 3ae5987c authored by mercury233's avatar mercury233

update scripts

parent 44e1d29e
--フォーチュンレディ・パスティー
--
--Scripted By-ღ Viola
function c101009008.initial_effect(c)
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c101009008.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101009008,0))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c101009008.lvcon)
e3:SetOperation(c101009008.lvop)
c:RegisterEffect(e3)
--remove,lvup
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101009008,1))
e4:SetCategory(CATEGORY_REMOVE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,101009008)
e4:SetTarget(c101009008.rmtg)
e4:SetOperation(c101009008.rmop)
c:RegisterEffect(e4)
end
function c101009008.value(e,c)
return c:GetLevel()*200
end
function c101009008.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11)
end
function c101009008.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c101009008.tgfilter(c,tp)
return c:IsSetCard(0x31) and c:IsLevelAbove(1) and c:IsFaceup()
and Duel.IsExistingMatchingCard(c101009008.rmfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,c)
end
function c101009008.rmfilter(c)
return c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemove()
end
function c101009008.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c101009008.tgfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c101009008.tgfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101009008.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE)
end
function c101009008.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
local ec=nil
if tc:IsRelateToEffect(e) then
ec=tc
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=Duel.SelectMatchingCard(tp,c101009008.rmfilter,tp,LOCATION_MZONE+LOCATION_HAND+LOCATION_GRAVE,0,1,99,ec,tp)
if rg:GetCount()>0 then
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
local lv=rg:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if lv>0 and tc:IsRelateToEffect(e) then
local op=0
if c:IsLevelBelow(lv) then op=Duel.SelectOption(tp,aux.Stringid(101009008,2))
else op=Duel.SelectOption(tp,aux.Stringid(101009008,2),aux.Stringid(101009008,3)) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
if op==0 then
e1:SetValue(lv)
else
e1:SetValue(-lv)
end
tc:RegisterEffect(e1)
end
end
end
--妖仙獣 侍郎風
--
--Script by mercury233
function c101009009.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,101009009)
e1:SetCondition(c101009009.thcon)
e1:SetTarget(c101009009.thtg)
e1:SetOperation(c101009009.thop)
c:RegisterEffect(e1)
--to field
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,101009009+100)
e2:SetTarget(c101009009.tftg)
e2:SetOperation(c101009009.tfop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c101009009.regop)
c:RegisterEffect(e3)
end
function c101009009.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c101009009.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009009.cfilter,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end
function c101009009.thfilter(c)
return c:IsSetCard(0xb3) and c:IsType(TYPE_PENDULUM) and c:IsAbleToHand()
end
function c101009009.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009009.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101009009.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101009009.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
function c101009009.tdfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3) and c:IsAbleToDeck()
end
function c101009009.tffilter(c)
return c:IsCode(62681049,79861914) and not c:IsForbidden()
end
function c101009009.tftg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsOnField() and c101009009.tdfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101009009.tdfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingMatchingCard(c101009009.tffilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c101009009.tdfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
function c101009009.tfop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local sc=Duel.SelectMatchingCard(tp,c101009009.tffilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if sc then
Duel.MoveToField(sc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)
end
end
end
function c101009009.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c101009009.rettg)
e1:SetOperation(c101009009.retop)
e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c101009009.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101009009.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--妖仙獣 飯綱鞭
--
--Script by mercury233
function c101009010.initial_effect(c)
--act limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,101009010)
e1:SetCost(c101009010.cost)
e1:SetOperation(c101009010.operation)
c:RegisterEffect(e1)
--draw
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1,101009010+100)
e2:SetCondition(c101009010.drcon)
e2:SetTarget(c101009010.drtg)
e2:SetOperation(c101009010.drop)
c:RegisterEffect(e2)
--return
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetOperation(c101009010.regop)
c:RegisterEffect(e3)
end
function c101009010.cost(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 c101009010.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCondition(c101009010.sumcon)
e1:SetOperation(c101009010.sumsuc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
Duel.RegisterEffect(e2,tp)
end
function c101009010.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c101009010.sumcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101009010.filter,1,nil)
end
function c101009010.sumsuc(e,tp,eg,ep,ev,re,r,rp)
Duel.SetChainLimitTillChainEnd(c101009010.efun)
end
function c101009010.efun(e,ep,tp)
return ep==tp
end
function c101009010.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c101009010.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009010.cfilter,tp,LOCATION_MZONE,0,1,e:GetHandler())
end
function c101009010.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c101009010.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c101009010.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetTarget(c101009010.rettg)
e1:SetOperation(c101009010.retop)
e1:SetReset(RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
function c101009010.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101009010.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--魔妖仙獣 独眼群主
--
--Script by mercury233
function c101009011.initial_effect(c)
--pendulum summon
aux.EnablePendulumAttribute(c)
--scale
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009011,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1,101009011)
e1:SetTarget(c101009011.target)
e1:SetOperation(c101009011.operation)
c:RegisterEffect(e1)
--return
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009011,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_PZONE)
e2:SetCountLimit(1,101009011+100)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCondition(c101009011.pretcon)
e2:SetTarget(c101009011.prettg)
e2:SetOperation(c101009011.pretop)
c:RegisterEffect(e2)
--spsummon limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e3:SetCode(EFFECT_SPSUMMON_CONDITION)
e3:SetValue(aux.penlimit)
c:RegisterEffect(e3)
--tohand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101009011,2))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c101009011.thtg)
e4:SetOperation(c101009011.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e5)
--attack
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(101009011,3))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetRange(LOCATION_MZONE)
e6:SetCode(EVENT_TO_HAND)
e6:SetCondition(c101009011.atkcon)
e6:SetOperation(c101009011.atkop)
c:RegisterEffect(e6)
local e7=e6:Clone()
e7:SetCode(EVENT_TO_DECK)
c:RegisterEffect(e7)
--return
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(101009011,4))
e8:SetCategory(CATEGORY_TOHAND)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetRange(LOCATION_MZONE)
e8:SetCountLimit(1)
e8:SetCode(EVENT_PHASE+PHASE_END)
e8:SetCondition(c101009011.retcon)
e8:SetTarget(c101009011.rettg)
e8:SetOperation(c101009011.retop)
c:RegisterEffect(e8)
if not c101009011.global_check then
c101009011.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetLabel(101009011)
ge1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
ge1:SetOperation(aux.sumreg)
Duel.RegisterEffect(ge1,0)
end
end
function c101009011.scalefilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3) and c:GetLeftScale()~=11
end
function c101009011.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c101009011.scalefilter,tp,LOCATION_PZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c101009011.scalefilter,tp,LOCATION_PZONE,0,1,1,nil)
end
function c101009011.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LSCALE)
e1:SetValue(11)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RSCALE)
tc:RegisterEffect(e2)
end
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetTarget(c101009011.splimit)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
function c101009011.splimit(e,c)
return not c:IsSetCard(0xb3)
end
function c101009011.pretcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c101009011.prettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101009011.pretop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
function c101009011.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and chkc:IsAbleToHand() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,Card.IsAbleToHand,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101009011.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 c101009011.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsReason(REASON_EFFECT) and c:GetReasonPlayer()==tp
end
function c101009011.atkcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101009011.cfilter,1,e:GetHandler(),tp)
end
function c101009011.atkfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c101009011.atkop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101009011.atkfilter,tp,LOCATION_MZONE,0,nil)
local tc=g:GetFirst()
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
tc=g:GetNext()
end
end
function c101009011.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(101009011)~=0
end
function c101009011.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c101009011.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--魂の造形家
--
--Script by mercury233
function c101009034.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009034,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101009034)
e1:SetCost(c101009034.thcost)
e1:SetTarget(c101009034.thtg)
e1:SetOperation(c101009034.thop)
c:RegisterEffect(e1)
end
function c101009034.getsum(c)
local atk=c:GetTextAttack()
if atk<0 then atk=0 end
local def=c:GetTextDefense()
if def<0 then def=0 end
return atk+def
end
function c101009034.cfilter(c,tp)
return c:IsDefenseAbove(0)
and Duel.IsExistingMatchingCard(c101009034.thfilter,tp,LOCATION_DECK,0,1,nil,c101009034.getsum(c))
end
function c101009034.thfilter(c,sum)
return c:IsType(TYPE_MONSTER) and c:IsAbleToHand() and c101009034.getsum(c)==sum
end
function c101009034.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c101009034.cfilter,1,nil,tp) end
local g=Duel.SelectReleaseGroup(tp,c101009034.cfilter,1,1,nil,tp)
e:SetLabel(c101009034.getsum(g:GetFirst()))
Duel.Release(g,REASON_COST)
end
function c101009034.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101009034.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101009034.thfilter,tp,LOCATION_DECK,0,1,1,nil,e:GetLabel())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--フォーチュンレディ・エヴァリー
--
--Scripted By-ღ Viola
function c101009038.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(Card.IsRace,RACE_SPELLCASTER),1)
c:EnableReviveLimit()
--atk,def
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c101009038.value)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--level up
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101009038,0))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCode(EVENT_PHASE+PHASE_STANDBY)
e3:SetCondition(c101009038.lvcon)
e3:SetOperation(c101009038.lvop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101009038,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCondition(c101009038.spcon)
e4:SetCost(c101009038.spcost)
e4:SetTarget(c101009038.sptg)
e4:SetOperation(c101009038.spop)
c:RegisterEffect(e4)
end
function c101009038.value(e,c)
return c:GetLevel()*400
end
function c101009038.lvcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and e:GetHandler():IsLevelAbove(1) and e:GetHandler():IsLevelBelow(11)
end
function c101009038.rmfilter(c)
return c:IsAbleToRemove() and c:IsFaceup()
end
function c101009038.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsLevelAbove(12) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local sg=Duel.GetMatchingGroup(c101009038.rmfilter,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(101009038,2)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=sg:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
function c101009038.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp
end
function c101009038.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_SPELLCASTER) and c:IsType(TYPE_MONSTER)
end
function c101009038.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009038.cfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tg=Duel.SelectMatchingCard(tp,c101009038.cfilter,tp,LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(tg,POS_FACEUP,REASON_COST)
end
function c101009038.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c101009038.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.GetMZoneCount(tp)>0 then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
--召命の神弓-アポロウーサ
--
--Script by mercury233
function c101009048.initial_effect(c)
c:SetUniqueOnField(1,0,101009048)
--link summon
aux.AddLinkProcedure(c,aux.NOT(aux.FilterBoolFunction(Card.IsLinkType,TYPE_TOKEN)),2,99,c101009048.lcheck)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetOperation(c101009048.valop)
c:RegisterEffect(e1)
--negate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009048,0))
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c101009048.condition)
e2:SetTarget(c101009048.target)
e2:SetOperation(c101009048.operation)
c:RegisterEffect(e2)
end
function c101009048.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==g:GetCount()
end
function c101009048.valop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsSummonType(SUMMON_TYPE_LINK) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetValue(c:GetMaterialCount()*800)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
end
function c101009048.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainNegatable(ev)
and not e:GetHandler():IsStatus(STATUS_CHAINING+STATUS_BATTLE_DESTROYED)
end
function c101009048.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackAbove(800) and c:GetFlagEffect(101009048)==0 end
if c:IsHasEffect(EFFECT_REVERSE_UPDATE) then
c:RegisterFlagEffect(101009048,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c101009048.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsFaceup() or not c:IsRelateToEffect(e) or c:GetAttack()<800
or Duel.GetCurrentChain()~=ev+1 or c:IsStatus(STATUS_BATTLE_DESTROYED) then
return
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-800)
c:RegisterEffect(e1)
Duel.NegateActivation(ev)
end
--フォーチュンレディ・コーリング
--
--Scripted By-ღ Viola
function c101009056.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009056+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101009056.spcon)
e1:SetTarget(c101009056.sptg)
e1:SetOperation(c101009056.spop)
c:RegisterEffect(e1)
end
function c101009056.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x31)
end
function c101009056.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101009056.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c101009056.tfilter(c,e,tp)
return c:IsSetCard(0x31) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and not Duel.IsExistingMatchingCard(c101009056.bfilter,tp,LOCATION_ONFIELD,0,1,nil,c)
end
function c101009056.bfilter(c,tc)
return tc:IsCode(c:GetCode()) and c:IsFaceup()
end
function c101009056.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>0 and Duel.IsExistingMatchingCard(c101009056.tfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c101009056.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101009056.tfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c101009056.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c101009056.splimit(e,c)
return not c:IsType(TYPE_SYNCHRO) and c:IsLocation(LOCATION_EXTRA)
end
--妖仙獣の風祀り
--
--Script by mercury233
function c101009057.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009057+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101009057.condition)
e1:SetTarget(c101009057.target)
e1:SetOperation(c101009057.activate)
c:RegisterEffect(e1)
end
function c101009057.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0xb3)
end
function c101009057.condition(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c101009057.cfilter,tp,LOCATION_MZONE,0,nil)
return g:GetClassCount(Card.GetCode)>=3
end
function c101009057.filter(c)
return c:IsFaceup() and c:IsSetCard(0xb3) and c:IsAbleToHand()
end
function c101009057.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009057.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c101009057.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function c101009057.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(c101009057.filter,tp,LOCATION_MZONE,0,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT)>0 then
local ct=5-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if ct>0 and Duel.IsPlayerCanDraw(tp,ct)
and Duel.SelectYesNo(tp,aux.Stringid(101009057,0)) then
Duel.BreakEffect()
Duel.Draw(tp,ct,REASON_EFFECT)
end
end
end
......@@ -17,7 +17,7 @@ function c101009067.condition(e,tp,eg,ep,ev,re,r,rp)
return ep==1-tp and r&REASON_EFFECT~=0 and rp==1-tp
end
function c101009067.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,30459350) end
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_IRON_WALL) end
local g=eg:Filter(Card.IsControler,nil,1-tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,0,1-tp,LOCATION_HAND)
......
--フォーチュンレディ・リワインド
--
--Scripted By-ღ Viola
function c101009070.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,101009070+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101009070.sptg)
e1:SetOperation(c101009070.spop)
c:RegisterEffect(e1)
end
function c101009070.filter(c,e,tp)
return c:IsSetCard(0x31) and c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101009070.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c101009070.filter(chkc,e,tp) end
if chk==0 then return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingTarget(c101009070.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
local ft=Duel.GetMZoneCount(tp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=Duel.GetMatchingGroup(c101009070.filter,tp,LOCATION_REMOVED,0,nil,e,tp):Filter(Card.IsCanBeEffectTarget,nil,e)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=g:SelectSubGroup(tp,aux.dncheck,false,1,ft)
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,tg:GetCount(),0,0)
end
function c101009070.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local fid=c:GetFieldID()
local ft=Duel.GetMZoneCount(tp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if ft<1 or g:GetCount()<1 or (g:GetCount()>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) then return end
if g:GetCount()<=ft then
local tc=g:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(101009070,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=g:GetNext()
end
Duel.SpecialSummonComplete()
g:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(g)
e1:SetCondition(c101009070.retcon)
e1:SetOperation(c101009070.retop)
Duel.RegisterEffect(e1,tp)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,ft,ft,nil)
local tc=sg:GetFirst()
while tc do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
tc:RegisterFlagEffect(101009070,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
sg:KeepAlive()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(sg)
e1:SetCondition(c101009070.retcon)
e1:SetOperation(c101009070.retop)
Duel.RegisterEffect(e1,tp)
g:Sub(sg)
Duel.SendtoGrave(g,REASON_RULE)
end
end
function c101009070.retfilter(c,fid)
return c:GetFlagEffectLabel(101009070)==fid
end
function c101009070.retcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
if not g:IsExists(c101009070.retfilter,1,nil,e:GetLabel()) then
g:DeleteGroup()
e:Reset()
return false
else return true end
end
function c101009070.retop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c101009070.retfilter,nil,e:GetLabel())
Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)
end
--星遺物の選託
--
--Script by mercury233
function c101009074.initial_effect(c)
--to grave
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101009074,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101009074+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101009074.tgtg)
e1:SetOperation(c101009074.tgop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101009074,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,101009074+EFFECT_COUNT_CODE_OATH)
e2:SetCost(c101009074.thcost)
e2:SetTarget(c101009074.thtg)
e2:SetOperation(c101009074.thop)
c:RegisterEffect(e2)
end
function c101009074.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_LINK)
end
function c101009074.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009074.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(c101009074.tgfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c101009074.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101009074.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function c101009074.rmfilter(c)
return c:IsSetCard(0xfe) and c:IsAbleToRemoveAsCost()
end
function c101009074.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009074.rmfilter,tp,LOCATION_GRAVE,0,7,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101009074.rmfilter,tp,LOCATION_GRAVE,0,7,7,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c101009074.thfilter(c)
return c:IsRace(RACE_CYBERSE) and c:IsAbleToHand()
end
function c101009074.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101009074.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101009074.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101009074.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 mercury233
function c101009078.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCountLimit(1,101009078+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c101009078.condition)
e1:SetTarget(c101009078.target)
e1:SetOperation(c101009078.activate)
c:RegisterEffect(e1)
end
function c101009078.cfilter(c,tp)
return c:GetPreviousControler()==tp
end
function c101009078.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:Filter(c101009078.cfilter,nil,tp):GetFirst()
if not tc then return false end
local atk=tc:GetAttack()
if atk<0 then atk=0 end
e:SetLabel(atk)
return true
end
function c101009078.spfilter(c,e,tp,atk)
return c:IsAttackBelow(atk) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
end
function c101009078.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101009078.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp,e:GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function c101009078.activate(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,c101009078.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp,e:GetLabel())
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)~=0 then
Duel.ConfirmCards(1-tp,g)
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