Commit c054acb1 authored by nanahira's avatar nanahira

missing

parent 3ed3b1a1
--动物朋友 槌蛇
function c33700074.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,33700074)
e1:SetCondition(c33700074.hcon)
e1:SetOperation(c33700074.hop)
c:RegisterEffect(e1)
--spsummon2
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700074,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,33700075)
e2:SetCost(c33700074.spcost)
e2:SetTarget(c33700074.sptg)
e2:SetOperation(c33700074.spop)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700074,1))
e3:SetCategory(CATEGORY_TOGRAVE)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,33700075)
e3:SetCost(c33700074.tgcost)
e3:SetTarget(c33700074.tgtg)
e3:SetOperation(c33700074.tgop)
c:RegisterEffect(e3)
end
function c33700074.cfilter(c)
return c:IsSetCard(0x442) and not c:IsPublic()
end
function c33700074.hcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMZoneCount(tp)>0
and Duel.IsExistingMatchingCard(c33700074.cfilter,tp,LOCATION_HAND,0,1,c)
end
function c33700074.hop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,c33700074.cfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
function c33700074.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c33700074.spfilter(c,e,tp)
return c:IsSetCard(0x442) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700074.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetMZoneCount(tp)>-1
and Duel.IsExistingMatchingCard(c33700074.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c33700074.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetMZoneCount(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33700074.spfilter,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
end
function c33700074.tgfilter(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
end
function c33700074.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700074.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700074.tgfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c33700074.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD)
and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g:GetFirst(),1,tp,LOCATION_ONFIELD)
end
function c33700074.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--VLiver Ushimi Ichigo
--AlphaKretin
--For Nemoma
local s = c33700411
local id = 33700411
function s.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(s.sprcon)
e2:SetOperation(s.sprop)
c:RegisterEffect(e2)
--immune
local e3 = Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.efilter)
c:RegisterEffect(e3)
--pierce
local e4 = Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
--double
local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e5:SetCondition(s.damcon)
e5:SetOperation(s.damop)
c:RegisterEffect(e5)
--shuffle register
local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_BATTLE_DAMAGE)
e6:SetCondition(s.regcon)
e6:SetOperation(s.regop)
c:RegisterEffect(e6)
end
function s.spcfilter(c)
return c:IsFaceup() and (c:GetAttack() > 2000) and c:IsAbleToGraveAsCost()
end
function s.mzfilter(c)
return c:GetSequence() < 5
end
function s.sprcon(e, c)
if c == nil then
return true
end
local tp = c:GetControler()
local mg = Duel.GetMatchingGroup(s.spcfilter, tp, LOCATION_MZONE, 0, nil)
local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
local ct = -ft + 1
return ft > -2 and mg:GetCount() > 1 and (ft > 0 or mg:IsExists(s.mzfilter, ct, nil))
end
function s.sprop(e, tp, eg, ep, ev, re, r, rp, c)
local mg = Duel.GetMatchingGroup(s.spcfilter, tp, LOCATION_MZONE, 0, nil)
local ft = Duel.GetLocationCount(tp, LOCATION_MZONE)
local g = nil
if ft > 0 then
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
g = mg:Select(tp, 2, 2, nil)
elseif ft > -1 then
local ct = -ft + 1
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
g = mg:FilterSelect(tp, s.mzfilter, ct, ct, nil)
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
local g2 = mg:Select(tp, 2 - ct, 2 - ct, g)
g:Merge(g2)
else
Duel.Hint(HINT_SELECTMSG, tp, HINTMSG_TOGRAVE)
g = mg:FilterSelect(tp, s.mzfilter, 2, 2, nil)
end
Duel.SendtoGrave(g, REASON_COST)
end
function s.efilter(e, te)
return te:GetOwner() ~= e:GetOwner()
end
function s.damcon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():GetBattleTarget() ~= nil
end
function s.damop(e, tp, eg, ep, ev, re, r, rp)
local dam = Duel.GetBattleDamage(ep)
Duel.ChangeBattleDamage(ep, dam * 2)
end
function s.regcon(e, tp, eg, ep, ev, re, r, rp)
return ep ~= tp
end
function s.regop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
--shuffle back
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS + EFFECT_TYPE_FIELD)
e1:SetCode(EVENT_PHASE + PHASE_END)
e1:SetCountLimit(1)
e1:SetLabelObject(c)
e1:SetReset(RESET_PHASE + PHASE_END)
e1:SetOperation(s.tdop)
Duel.RegisterEffect(e1, tp)
end
function s.tdop(e, tp, eg, ep, ev, re, r, rp)
Duel.SendtoDeck(e:GetLabelObject(), nil, 2, REASON_EFFECT)
end
--妖幻战姬 长枪兵
local m=33700760
local cm=_G["c"..m]
if not RSTFVal then
RSTFVal=RSTFVal or {}
tfrsv=RSTFVal
function tfrsv.SSLimitEffect(c)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(tfrsv.splimit)
c:RegisterEffect(e1)
end
function tfrsv.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x344a)
end
function tfrsv.columntg(e,c)
--local g=e:GetHandler():GetColumnGroup(e:GetHandlerPlayer(),1,1)
--return g:IsContains(c) and c~=e:GetHandler() and c:GetSequence()<5
return c~=e:GetHandler() and c:GetSequence()<5 and math.abs(e:GetHandler():GetSequence()-c:GetSequence())<=1
end
function tfrsv.columntg2(e,c)
return tfrsv.columntg(e,c) and c:IsSetCard(0x344a)
end
function tfrsv.ToGraveEffect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(tfrsv.thcon)
e1:SetTarget(tfrsv.thtg)
e1:SetOperation(tfrsv.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_LEAVE_FIELD_P)
e2:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetOperation(tfrsv.lvop)
c:RegisterEffect(e2)
e1:SetLabelObject(e2)
end
function tfrsv.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetFlagEffect(c:GetOriginalCode())==0 then
e:SetLabel(1)
else e:SetLabel(0) end
end
function tfrsv.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) and e:GetLabelObject():GetLabel()==0
end
function tfrsv.thfilter(c,code)
return c:IsSetCard(0x344a) and not c:IsCode(code) and c:IsAbleToHand()
end
function tfrsv.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(tfrsv.thfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil,e:GetHandler():GetOriginalCode()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function tfrsv.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(tfrsv.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e:GetHandler():GetOriginalCode())
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
end
end
function tfrsv.ActivateEffect(c,operation)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetTarget(tfrsv.settg)
e1:SetOperation(tfrsv.setop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(tfrsv.spcon)
e2:SetTarget(tfrsv.sptg)
e2:SetOperation(tfrsv.spop)
c:RegisterEffect(e2)
operation(c)
end
function tfrsv.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
end
function tfrsv.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) or not c:IsLocation(LOCATION_HAND) or not Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then return end
local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1)
c:RegisterFlagEffect(c:GetOriginalCode(),RESET_EVENT+RESETS_STANDARD,0,1)
end
function tfrsv.ccon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetFlagEffect(e:GetHandler():GetOriginalCode())>0
end
function tfrsv.spcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function tfrsv.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function tfrsv.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,true,POS_FACEUP)
end
-------------------
end
-------------------
if cm then
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ToGraveEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--Atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
function cm.operation(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,3))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PREDRAW)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(aux.AND(tfrsv.ccon,cm.thcon))
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function cm.thfilter(c)
return c:IsSetCard(0x344a) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
_replace_count=0
_replace_max=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
_replace_count=_replace_count+1
if _replace_count>_replace_max or not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.thfilter,tp,LOCATION_DECK,0,1,2,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-------------------
end
\ No newline at end of file
--妖幻战姬 弓箭手
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700761
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ToGraveEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--Atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg)
e1:SetValue(1000)
c:RegisterEffect(e1)
end
function cm.operation(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(tfrsv.ccon)
e1:SetTarget(cm.thtg)
e1:SetOperation(cm.thop)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsSetCard(0x344a) and c:IsAbleToHand()
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE)
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--妖幻战姬 盗贼
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700762
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ToGraveEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--de
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function cm.operation(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(tfrsv.ccon)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function cm.filter(c)
return c:IsSetCard(0x344a) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,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
--妖幻战姬 武僧
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700763
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ToGraveEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--de
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg)
e1:SetValue(1)
c:RegisterEffect(e1)
end
function cm.operation(c)
--draw
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(tfrsv.ccon)
e1:SetCost(cm.drcost)
e1:SetTarget(cm.drtg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
end
function cm.drcfilter(c)
return c:IsSetCard(0x344a) and c:IsType(TYPE_MONSTER) and c:IsDiscardable()
end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.drcfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,cm.drcfilter,1,1,REASON_DISCARD+REASON_COST)
end
function cm.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 cm.drop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
--妖幻战姬 圣骑士
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700764
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--de
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg2)
e1:SetValue(1)
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(tfrsv.columntg2)
e2:SetValue(aux.tgoval)
c:RegisterEffect(e2)
end
function cm.operation(c)
--damage reduce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e1:SetCondition(aux.AND(tfrsv.ccon,cm.rdcon))
e1:SetOperation(cm.rdop)
c:RegisterEffect(e1)
end
function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function cm.rdop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(tp,ev/2)
end
--妖幻战姬 浪人
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700765
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(tfrsv.columntg2)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
end
function cm.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function cm.operation(c)
--atk & def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(cm.valfilter)
e2:SetValue(800)
e2:SetCondition(tfrsv.ccon)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e1)
end
function cm.valfilter(e,c)
return c:IsSetCard(0x644a) or c:IsSetCard(0x344a)
end
\ No newline at end of file
--妖幻战姬 狂战士
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700766
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.atcon)
e1:SetCost(cm.atcost)
e1:SetOperation(cm.atop)
c:RegisterEffect(e1)
end
function cm.operation(c)
--tog
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_SZONE)
e1:SetCondition(tfrsv.ccon)
e1:SetCost(cm.tgcost)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
end
function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_ONFIELD)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
function cm.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function cm.rfilter(c,e)
return tfrsv.columntg2(e,c)
end
function cm.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,e:GetHandler(),e) end
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,e:GetHandler(),e)
local atk=g:GetFirst():GetTextAttack()
if atk<0 then atk=0 end
local def=g:GetFirst():GetTextDefense()
if def<0 then def=0 end
e:SetLabel(atk)
e:SetValue(def)
Duel.Release(g,REASON_COST)
end
function cm.atop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(e:GetValue())
c:RegisterEffect(e2)
end
end
--妖幻战姬 巫女
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700767
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.spcost)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.operation(c)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(LOCATION_SZONE,0)
e1:SetCondition(tfrsv.ccon)
e1:SetTarget(cm.cbtg)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
end
function cm.cbtg(e,c)
return c:IsType(TYPE_CONTINUOUS) and c:IsType(TYPE_SPELL) and c:IsSetCard(0x344a) and c~=e:GetHandler()
end
function cm.rfilter(c,e)
local tp=e:GetHandlerPlayer()
return tfrsv.columntg2(e,c) and Duel.GetMZoneCount(tp,c,tp)>0
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,e:GetHandler(),e) end
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,e:GetHandler(),e)
Duel.Release(g,REASON_COST)
end
function cm.spfilter(c,e,tp)
return c:IsSetCard(0x344a) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function cm.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(cm.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--妖幻战姬 炼金术师
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700768
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.setcon)
e1:SetTarget(cm.settg)
e1:SetOperation(cm.setop)
c:RegisterEffect(e1)
end
function cm.operation(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(tfrsv.ccon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
end
function cm.tgfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and cm.tgfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.Recover(1-tp,1000,REASON_EFFECT)
end
end
function cm.setcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_MZONE,0,1,nil,e)
end
function cm.rfilter(c,e)
local tp=e:GetHandlerPlayer()
return tfrsv.columntg2(e,c)
end
function cm.setfilter(c,tp)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable(true) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
end
function cm.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.setfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(cm.setfilter,tp,0,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectTarget(tp,cm.setfilter,tp,0,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function cm.setop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and (tc:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0) then
Duel.SSet(tp,tc)
Duel.ConfirmCards(1-tp,tc)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetReset(RESET_EVENT+RESETS_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
tc:RegisterEffect(e1,true)
end
end
\ No newline at end of file
--妖幻战姬 傀儡师
if not pcall(function() require("expansions/script/c33700760") end) then require("script/c33700760") end
local m=33700769
local cm=_G["c"..m]
function cm.initial_effect(c)
tfrsv.SSLimitEffect(c)
tfrsv.ActivateEffect(c,cm.operation)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1e0)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.spcon)
e1:SetTarget(cm.sptg)
e1:SetOperation(cm.spop)
c:RegisterEffect(e1)
end
function cm.operation(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetCountLimit(1)
e1:SetCondition(tfrsv.ccon)
e1:SetTarget(cm.tgtg)
e1:SetOperation(cm.tgop)
c:RegisterEffect(e1)
end
function cm.tgfilter(c)
return c:IsAbleToGrave()
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and cm.tgfilter(chkc) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
Duel.Recover(1-tp,1000,REASON_EFFECT)
end
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.rfilter,tp,LOCATION_MZONE,0,1,nil,e)
end
function cm.rfilter(c,e)
return tfrsv.columntg2(e,c)
end
function cm.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
local seq=c:GetSequence()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and cm.spfilter(chkc,e,tp) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(cm.spfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp) and seq>0 and seq<4 and (Duel.CheckLocation(tp,LOCATION_MZONE,seq-1) or Duel.CheckLocation(tp,LOCATION_MZONE,seq+1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,cm.filter,tp,0,LOCATION_GRAVE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local seq=c:GetSequence()
local zone2=0
if seq==0 then zone2=0x2
elseif seq==4 then zone2=0x8
else zone2=2^(seq-1)+2^(seq+1)
end
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP,zone2)
end
end
\ No newline at end of file
--偶像部虚拟主播 夜樱 灵
function c33700794.initial_effect(c)
c:EnableReviveLimit()
--special summon rule
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c33700794.sprcon)
e1:SetOperation(c33700794.sprop)
c:RegisterEffect(e1)
--disable attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700794,1))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetTarget(c33700794.atktg)
e2:SetOperation(c33700794.atkop)
c:RegisterEffect(e2)
end
function c33700794.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
if chk==0 then return Duel.GetAttacker()==e:GetHandler() and Duel.IsExistingMatchingCard(c33700794.tgfilter,tp,0,LOCATION_MZONE,1,nil,atk) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_MZONE)
end
function c33700794.tgfilter(c,atk)
return c:IsFaceup() and c:IsAttackBelow(atk-1)
end
function c33700794.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local atk=c:GetAttack()
if c:IsRelateToBattle() and Duel.NegateAttack() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c33700794.tgfilter,tp,0,LOCATION_MZONE,1,4,nil,atk)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
end
function c33700794.thfilter(c,tp)
return c33700794.thfilter2(c) and Duel.GetMZoneCount(tp,c,tp)>0
end
function c33700794.thfilter2(c)
return c:IsFaceup() and not c:IsSummonableCard() and c:IsAbleToHandAsCost()
end
function c33700794.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsExistingMatchingCard(c33700794.thfilter,tp,LOCATION_MZONE,0,1,nil,tp)
end
function c33700794.sprop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c33700794.thfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
if Duel.IsExistingMatchingCard(c33700794.thfilter2,tp,LOCATION_MZONE,0,1,g:GetFirst()) and Duel.SelectYesNo(tp,aux.Stringid(33700794,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g2=Duel.SelectMatchingCard(tp,c33700794.thfilter2,tp,LOCATION_MZONE,0,1,99,g:GetFirst())
g:Merge(g2)
end
Duel.SendtoHand(g,nil,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_BASE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TOFIELD)
e1:SetValue(g:GetCount()*1000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_BASE_DEFENSE)
c:RegisterEffect(e2)
end
\ No newline at end of file
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