Commit 568ff407 authored by Nemo Ma's avatar Nemo Ma

Adding tons of new cards

parent 4dea92c5
No preview for this file type
--疑虚拟YouTuber 鳩羽伦
local m=33700356
local cm=_G["c"..m]
function c33700356.initial_effect(c)
--fus
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttack,0),3,true)
aux.EnablePendulumAttribute(c,false)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_PZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetTargetRange(1,1)
e1:SetTarget(function(e,c,sump,sumtype) return sumtype&SUMMON_TYPE_PENDULUM ==SUMMON_TYPE_PENDULUM end)
c:RegisterEffect(e1)
--p
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,2))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetCountLimit(1)
e2:SetRange(LOCATION_PZONE)
e2:SetCondition(function(e,tp)
return Duel.GetTurnPlayer()==tp
end)
e2:SetOperation(cm.psop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_PZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(function(e,c) return c:IsRankAbove(e:GetHandler():GetLeftScale()) or c:IsLevelAbove(e:GetHandler():GetLeftScale()) end)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
--ad
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_PZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(function(e,c) return c:IsRankAbove(e:GetHandler():GetLeftScale()) or c:IsLevelAbove(e:GetHandler():GetLeftScale()) end)
e5:SetCode(EFFECT_SET_ATTACK)
e5:SetValue(0)
c:RegisterEffect(e5)
local e7=e5:Clone()
e7:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e7)
--atk
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_STANDBY)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_MZONE,0,1,nil,e:GetHandler():GetAttack(),e:GetHandler():GetDefense()) end)
e6:SetOperation(cm.adop)
c:RegisterEffect(e6)
--cannot attack
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_ATTACK)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(function(e,c) return cm.cfilter(c,e:GetHandler():GetAttack(),e:GetHandler():GetDefense()) and c~=e:GetHandler() end)
c:RegisterEffect(e4)
--pendulum
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(m,1))
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetProperty(EFFECT_FLAG_DELAY)
e8:SetCondition(cm.pencon)
e8:SetTarget(cm.pentg)
e8:SetOperation(cm.penop)
c:RegisterEffect(e8)
end
function cm.psop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LSCALE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_RSCALE)
c:RegisterEffect(e2)
end
function cm.cfilter(c,atk,def)
return c:IsFaceup() and (c:IsAttackAbove(atk) or c:IsDefenseAbove(def))
end
function cm.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
function cm.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsFaceup()
end
function cm.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function cm.penop(e,tp,eg,ep,ev,re,r,rp)
if not Duel.CheckLocation(tp,LOCATION_PZONE,0) and not Duel.CheckLocation(tp,LOCATION_PZONE,1) then return false end
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
end
--虚拟YouTuber 月之美兔
local m=33700357
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,nil,2,2,cm.lcheck)
c:EnableReviveLimit()
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10122017,0))
e3:SetCategory(CATEGORY_TOKEN+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,m)
e3:SetHintTiming(0,0x1e0)
e3:SetCost(cm.cost)
e3:SetCondition(cm.con)
e3:SetTarget(cm.tg)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
--atk down
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetValue(cm.val)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e1)
end
function cm.val(e,c)
local ct=e:GetHandler():GetLinkedGroup():FilterCount(Card.IsType,nil,TYPE_TOKEN)
return ct*-500
end
function cm.lcheck(g,lc)
return g:IsExists(Card.IsType,1,nil,TYPE_TOKEN)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_MAIN1 or ph==PHASE_MAIN2)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAttackAbove(500) end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(-500)
c:RegisterEffect(e1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,500,500,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if Duel.GetLocationCount(tp,LOCATION_MZONE,LOCATION_REASON_TOFIELD,zone)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,m+1,0,0x4011,500,500,1,RACE_CYBERSE,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,m+1)
if Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP,zone)<=0 then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
token:RegisterEffect(e1)
end
--虚拟YouTuber 野良猫 II
local m=33700359
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddXyzProcedure(c,nil,5,2)
c:EnableReviveLimit()
c:SetUniqueOnField(1,0,m)
--handes
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_TO_HAND)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(cm.hdcon)
e3:SetCost(cm.hdcost)
e3:SetTarget(cm.hdtg)
e3:SetOperation(cm.hdop)
c:RegisterEffect(e3)
--asd
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_TO_HAND)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(cm.hdcon2)
e4:SetTarget(cm.hdtg2)
e4:SetOperation(cm.hdop2)
c:RegisterEffect(e4)
end
function cm.hdcon2(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return #eg==1 and rp==tp and tc:IsControler(tp) and tc:IsPreviousLocation(LOCATION_DECK)
end
function cm.hdtg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
Duel.SetTargetCard(eg)
end
function cm.hdop2(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
if not tc:IsRelateToEffect(e) then return end
if not c:IsRelateToEffect(e) then return end
if not c:IsType(TYPE_XYZ) then return end
Duel.Overlay(c,Group.FromCards(tc))
end
function cm.hdcost(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 cm.hdcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.cfilter,1,nil,re) and #eg==1
end
function cm.cfilter(c,re)
if c:IsReason(REASON_DRAW) then return false end
if re and re:GetHandler():IsCode(m) then return false end
return c:IsPreviousLocation(LOCATION_DECK) and c:IsAbleToDeck()
end
function cm.hdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.hdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoDeck(tc,nil,2,REASON_EFFECT)<=0 then return end
Duel.BreakEffect()
local p=tc:GetOwner()
local ctype=TYPE_SPELL
if tc:IsType(TYPE_MONSTER) then ctype=TYPE_MONSTER end
if tc:IsType(TYPE_TRAP) then ctype=TYPE_TRAP end
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(p,cm.thfilter,p,LOCATION_DECK,0,1,1,nil,ctype)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-p,g)
end
end
function cm.thfilter(c,ctype)
return c:IsType(ctype) and c:IsAbleToHand()
end
--虚拟YouTuber 藤崎由愛
local m=33700360
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
local f1=aux.FilterBoolFunction(Card.IsLevel,3)
local f4=aux.FilterBoolFunction(Card.IsLevel,3)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Auxiliary.SynMixCondition(f1,nil,nil,f4,1,1))
e1:SetTarget(Auxiliary.SynMixTarget(f1,nil,nil,f4,1,1))
e1:SetOperation(Auxiliary.SynMixOperation(f1,nil,nil,f4,1,1))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end
--虚拟YouTuber的生放送
local m=33700362
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return eg:GetCount()==1 and tc:IsSetCard(0x445) and tc:IsFaceup()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=eg:GetFirst()
local mg=tc:GetMaterial()
local sg=mg:Filter(cm.spfilter,nil,e,tp,tc)
if chk==0 then return #sg>0 and #sg==#mg and (#sg==1 or not Duel.IsPlayerAffectedByEffect(tp,59822133)) and Duel.GetLocationCount(tp,LOCATION_MZONE)>=#sg end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg,#sg,0,0)
end
function cm.spfilter(c,e,tp,tc)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x8)==0x8 and c:GetReasonCard()==tc
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
if not (tc:IsRelateToEffect(e) and tc:IsFaceup()) then return end
local mg=tc:GetMaterial()
local sg=mg:Filter(cm.spfilter,nil,e,tp,tc)
if #sg<1 or #sg~=#mg or (#sg>1 and Duel.IsPlayerAffectedByEffect(tp,59822133)) or Duel.GetLocationCount(tp,LOCATION_MZONE)<#sg then return end
local ct=Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
if ct<=0 then return end
local g=Duel.GetOperatedGroup()
for tc2 in aux.Next(g) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e1:SetValue(1)
tc2:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
tc2:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
tc2:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
tc2:RegisterEffect(e4)
c:SetCardTarget(tc2)
end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_CANNOT_DISABLE)
e1:SetCode(EVENT_LEAVE_FIELD)
g:KeepAlive()
e1:SetLabelObject(g)
e1:SetCondition(function(e)
local rg=e:GetHandler():GetCardTarget():Filter(Card.IsLocation,nil,LOCATION_MZONE)
if rg:GetCount()<=0 then e:Reset() return false end
return true
end
)
e1:SetOperation(function(e)
local rg=e:GetHandler():GetCardTarget():Filter(Card.IsLocation,nil,LOCATION_MZONE)
Duel.Destroy(rg,REASON_EFFECT)
e:Reset()
end
)
tc:RegisterEffect(e1,true)
end
--虚拟YouTuber的暴走
function c33700365.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DECKDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33700365.cost)
e1:SetTarget(c33700365.target)
e1:SetOperation(c33700365.activate)
c:RegisterEffect(e1)
end
function c33700365.cost(e)
e:SetLabel(100)
return true
end
function c33700365.tgfilter(c,tc)
return c:IsFaceup() and c:IsSetCard(0x445) and not c:IsCode(tc:GetCode())
end
function c33700365.cfilter(c)
return c:IsSetCard(0x445) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(c33700365.tgfilter,c:GetControler(),LOCATION_MZONE,0,1,nil,c)
end
function c33700365.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c33700365.tgfilter(chkc) end
if chk==0 then
if e:GetLabel()~=100 then return false end
e:SetLabel(0)
return Duel.IsExistingMatchingCard(c33700365.cfilter,tp,LOCATION_EXTRA,0,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,c33700365.cfilter,tp,LOCATION_EXTRA,0,1,1,nil):GetFirst()
Duel.SendtoGrave(tc,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c33700365.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,tc)
e:SetValue(tc:GetCode())
end
function c33700365.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
tc:CopyEffect(e:GetValue(),RESET_EVENT+RESETS_STANDARD)
end
end
--虚拟YouTuber 电脑少女小白·春
function c33700367.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,4,3)
c:EnableReviveLimit()
--indes
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(function(e,rc) return rc:IsAttackAbove(e:GetHandler():GetAttack()) end)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(function(e,re) return re:IsActiveType(TYPE_MONSTER) and re:GetOwner()~=e:GetOwner() and re:GetHandler():IsDefenseBelow(e:GetHandler():GetDefense()) end)
c:RegisterEffect(e2)
--aadd
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCondition(c33700367.adcon)
e3:SetCost(c33700367.adcost)
e3:SetOperation(c33700367.adop)
c:RegisterEffect(e3)
end
function c33700367.adcon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp
end
function c33700367.adcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
c:RemoveOverlayCard(tp,1,1,REASON_COST)
if c:GetOverlayCount()==0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(c33700367.efilter)
c:RegisterEffect(e1)
end
end
function c33700367.efilter(e,te)
return te:IsActiveType(TYPE_SPELL+TYPE_TRAP)
end
function c33700367.adop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
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)
e1:SetValue(500)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
\ No newline at end of file
--虚拟YouTuber 猫宫Hinita II
function c33700372.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(nil),aux.Tuner(nil),nil,aux.NonTuner(nil),1,1)
c:EnableReviveLimit()
--destroy
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700372,0))
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(c33700372.descost)
e1:SetTarget(c33700372.destg)
e1:SetOperation(c33700372.desop)
c:RegisterEffect(e1)
end
function c33700372.disfilter(c)
return aux.disfilter1(c)
end
function c33700372.rfilter(c)
return Duel.IsPlayerCanRelease(c:GetControler(),c)
end
function c33700372.cfilter(c)
return c:IsLocation(LOCATION_GRAVE) and c:IsPreviousLocation(LOCATION_HAND)
end
function c33700372.descost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(c33700372.disfilter,tp,0,LOCATION_ONFIELD,nil)
local rg1=Duel.GetReleaseGroup(tp,true)
local rg2=Duel.GetMatchingGroup(c33700372.rfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,rg1)
rg1:Merge(rg2)
rg1:RemoveCard(c)
local ct=math.min(#rg1,#g)
if chk==0 then return #rg1>=#g and #g>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local rg3=rg1:Select(tp,1,ct,nil)
local ct2=Duel.SendtoGrave(rg3,REASON_COST+REASON_RELEASE)
e:SetLabel(ct2)
end
function c33700372.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,0,0)
end
function c33700372.desop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
local c=e:GetHandler()
if Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=Duel.SelectMatchingCard(tp,c33700372.disfilter,tp,0,LOCATION_ONFIELD,ct,ct,nil)
if #dg<=0 then return end
Duel.HintSelection(dg)
for tc in aux.Next(dg) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
Duel.AdjustInstantly()
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
end
Duel.Destroy(dg,REASON_EFFECT)
else
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_DECK+LOCATION_HAND,nil)
if #g<ct then return end
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=g:Select(tp,ct,ct,nil)
Duel.SendtoGrave(tg,REASON_EFFECT)
if tg:IsExists(c33700372.cfilter,1,nil) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SKIP_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,1)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(function(e3) return Duel.GetTurnCount()==e3:GetLabel() end)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
--虚拟YouTuber 田中姬
function c33700373.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackBelow,2100),2,false)
--direct attack
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_DIRECT_ATTACK)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
c:RegisterEffect(e5)
--halve damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33700373.damcon)
e3:SetOperation(c33700373.damop)
c:RegisterEffect(e3)
--tg
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DAMAGE)
e2:SetCondition(c33700373.condition)
e2:SetOperation(c33700373.operation)
c:RegisterEffect(e2)
end
function c33700373.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c33700373.operation(e,tp,eg,ep,ev,re,r,rp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e3:SetReset(RESET_PHASE+PHASE_END,2)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetTargetRange(0xff,0xff)
e3:SetTarget(c33700373.tg)
e3:SetValue(1)
Duel.RegisterEffect(e3,tp)
end
function c33700373.tg(e,re,rp)
return re:GetHandler()~=e:GetOwner() and rp==1-e:GetHandlerPlayer()
end
function c33700373.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and tc:IsControler(tp) and tc:GetBattleTarget()==nil
end
function c33700373.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev/2)
end
\ No newline at end of file
--虚拟YouTuber 时乃空
function c33700374.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.NonTuner(Card.IsAttribute,ATTRIBUTE_LIGHT),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700374,0))
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c33700374.ccon)
e1:SetOperation(c33700374.cop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_CHANGE_POS)
c:RegisterEffect(e2)
--pos
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33700374,1))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
e4:SetOperation(c33700374.posop)
c:RegisterEffect(e4)
end
function c33700374.posop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.ChangePosition(c,POS_FACEUP_DEFENSE,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK,POS_FACEUP_ATTACK)
end
end
function c33700374.ccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function c33700374.cfilter(c)
return not c:IsPosition(POS_FACEUP_DEFENSE)
end
function c33700374.cop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33700374.cfilter,tp,0,LOCATION_MZONE,nil)
Duel.ChangePosition(g,POS_FACEUP_DEFENSE)
local rg=Duel.GetOperatedGroup()
for tc in aux.Next(rg) do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(tc:GetDefense()*-1)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
--虚拟YouTuber 藤崎由愛 II
function c33700378.initial_effect(c)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
local f1=aux.FilterBoolFunction(Card.IsLevel,5)
local f4=aux.FilterBoolFunction(Card.IsLevel,5)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700378,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(Auxiliary.SynMixCondition(f1,nil,nil,f4,1,1))
e1:SetTarget(Auxiliary.SynMixTarget(f1,nil,nil,f4,1,1))
e1:SetOperation(Auxiliary.SynMixOperation(f1,nil,nil,f4,1,1))
e1:SetValue(SUMMON_TYPE_SYNCHRO)
c:RegisterEffect(e1)
end
--电子的交响曲
function c33700379.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_FZONE)
e2:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1 end)
e2:SetValue(c33700379.efilter)
c:RegisterEffect(e2)
--immune2
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetTarget(function(e,rc) return e:GetHandler()~=rc end)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==2 end)
e3:SetValue(c33700379.efilter)
c:RegisterEffect(e3)
--toh
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetCategory(CATEGORY_TOHAND)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0 and Duel.GetTurnPlayer()==tp end)
e4:SetTarget(c33700379.thtg)
e4:SetOperation(c33700379.thop)
c:RegisterEffect(e4)
end
function c33700379.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c33700379.thop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
end
end
function c33700379.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--虚拟YouTuber的自吹
function c33700380.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c33700380.activate)
c:RegisterEffect(e1)
--prda
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700380,0))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c33700380.condition)
e2:SetTarget(c33700380.target)
e2:SetOperation(c33700380.operation)
c:RegisterEffect(e2)
end
function c33700380.condition(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 c33700380.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHand() 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,e:GetHandler(),1,0,0)
end
function c33700380.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
_replace_count=_replace_count+1
if _replace_count<=_replace_max and c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
function c33700380.activate(e,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x445))
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetValue(c33700380.efilter)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x445))
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
function c33700380.efilter(e,te)
return te:GetOwner()~=e:GetHandler()
end
\ No newline at end of file
--调阶魔法 - 羽化换骨
local m=33700383
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.spfilter1(c,e,tp)
return c:IsFaceup() and c:IsLevelAbove(1) and Duel.IsExistingTarget(cm.spfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,e,tp,c:GetLevel()) and not c:IsImmuneToEffect(e)
end
function cm.spfilter3(c,e,tp,lv)
return c:IsFaceup() and c:IsLevel(lv) and Duel.IsExistingMatchingCard(cm.spfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv) and not c:IsImmuneToEffect(e)
end
function cm.spfilter2(c,e,tp)
local lv=0
if c:IsLevelAbove(1) then lv=c:GetLevel() end
if c:IsRankAbove(1) then lv=c:GetRank() end
return c:IsSetCard(0x445) and c:IsFaceup() and lv>0 and Duel.GetLocationCountFromEx(tp)>0 and Duel.IsExistingMatchingCard(cm.spfilter4,tp,LOCATION_EXTRA,0,1,nil,e,tp,lv) and not c:IsImmuneToEffect(e)
end
function cm.spfilter4(c,e,tp,lv)
return c:IsType(TYPE_XYZ) and c:IsSetCard(0x445) and c:IsRankBelow(lv) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then
if e:GetLabel()==0 then return false
else
return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and cm.spfilter2(chkc,e,tp)
end
end
local b1=Duel.IsExistingTarget(cm.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(cm.spfilter2,tp,LOCATION_MZONE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(m,0),aux.Stringid(m,1))
elseif b1 then
op=Duel.SelectOption(tp,aux.Stringid(m,0))
else
op=Duel.SelectOption(tp,aux.Stringid(m,1))+1
end
e:SetLabel(op)
if op==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g1=Duel.SelectTarget(tp,cm.spfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g2=Duel.SelectTarget(tp,cm.spfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,g1,e,tp,g1:GetFirst():GetLevel())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,cm.spfilter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e)
if e:GetLabel()==0 then
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e)
if #g~=2 or g:GetClassCount(Card.GetLevel)~=1 or Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,g:GetFirst():GetLevel())
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
if c then c:CancelToGrave(true) g:AddCard(c) end
Duel.Overlay(sg:GetFirst(),g)
end
else
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=Duel.SelectMatchingCard(tp,cm.spfilter4,tp,LOCATION_EXTRA,0,1,1,nil,e,tp,tc:GetLevel())
if #sg>0 and Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
local g=Group.FromCards(tc)
if c then c:CancelToGrave(true) g:AddCard(c) end
Duel.Overlay(sg:GetFirst(),g)
end
end
end
--虚拟YouTuber 铃木雏
function c33700384.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsAttackAbove,2100),2,false)
--actlimit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(0,1)
e2:SetValue(c33700384.aclimit)
e2:SetCondition(c33700384.actcon)
c:RegisterEffect(e2)
--tg
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700384,0))
e1:SetCategory(CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DAMAGE)
e1:SetCondition(c33700384.condition)
e1:SetOperation(c33700384.operation)
c:RegisterEffect(e1)
end
function c33700384.condition(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and Duel.GetAttackTarget()==nil
end
function c33700384.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
end
function c33700384.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700384.actcon(e)
return Duel.GetAttacker():IsControler(e:GetHandlerPlayer()) and not Duel.GetAttackTarget()
end
\ No newline at end of file
--虚拟YouTuber HimeHina
function c33700385.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,33700373,33700384,1,false,false)
--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(aux.fuslimit)
c:RegisterEffect(e1)
--indes
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetCondition(function(e) return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE end)
e4:SetValue(1)
c:RegisterEffect(e4)
--direct attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--double damage
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c33700385.damcon)
e3:SetOperation(c33700385.damop)
c:RegisterEffect(e3)
end
function c33700385.damcon(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
return ep~=tp and not tc:GetBattleTarget()
end
function c33700385.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChangeBattleDamage(ep,ev*2)
end
\ No newline at end of file
--虚拟YouTuber AI Games
function c33700386.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,nil,3,3)
--check
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_MATERIAL_CHECK)
e1:SetValue(c33700386.valcheck)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(function(e,rc) return e:GetHandler():GetLinkedGroup():IsContains(rc) end)
e2:SetCondition(function(e) return e:GetLabelObject():GetLabel()==1 end)
e2:SetCode(EFFECT_DISABLE)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_ATTACK)
c:RegisterEffect(e3)
--indes
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e5:SetTarget(function(e,rc) return e:GetHandler():GetLinkedGroup():IsContains(rc) end)
e5:SetCondition(function(e) return e:GetLabelObject():GetValue()==1 end)
e5:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e5:SetValue(1)
e5:SetLabelObject(e1)
c:RegisterEffect(e5)
local e4=e5:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
local e6=e5:Clone()
e6:SetCode(EFFECT_UNRELEASABLE_SUM)
c:RegisterEffect(e6)
local e7=e5:Clone()
e7:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e7)
local e8=e5:Clone()
e8:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
c:RegisterEffect(e8)
local e9=e5:Clone()
e9:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e9)
local e10=e5:Clone()
e10:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e10)
local e11=e5:Clone()
e11:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e11)
--adjust
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e12:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e12:SetCode(EVENT_ADJUST)
e12:SetRange(LOCATION_MZONE)
e12:SetOperation(c33700386.adjustop)
c:RegisterEffect(e12)
end
function c33700386.adjustop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
if c:GetSequence()>=5 then return end
local g=c:GetLinkedGroup()
if Duel.SendtoGrave(g,REASON_EFFECT)>0 then
Duel.Readjust()
end
end
function c33700386.valcheck(e,c)
local g=c:GetMaterial()
if g:GetClassCount(Card.GetRace)==#g then
e:SetValue(1)
else
e:SetValue(0)
end
if g:GetClassCount(Card.GetAttribute)==#g then
e:SetLabel(1)
else
e:SetLabel(0)
end
end
\ No newline at end of file
--虚拟YouTuber 时乃空 II
function c33700387.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,9,2,c33700387.ovfilter,aux.Stringid(33700387,0),3)
c:EnableReviveLimit()
--atk
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetValue(c33700387.val)
c:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700387,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1)
e2:SetCost(c33700387.atkcost)
e2:SetTarget(c33700387.atktg)
e2:SetOperation(c33700387.atkop)
c:RegisterEffect(e2)
end
function c33700387.atkcost(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 c33700387.atktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() and chkc~=c end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,c) and (c:IsAttackAbove(1) or c:IsDefenseAbove(1)) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,c)
end
function c33700387.atkop(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:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(c:GetDefense())
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_ATTACK)
e3:SetProperty(EFFECT_FLAG_OATH)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetTarget(c38568567.ftarget)
e3:SetLabel(tc:GetFieldID())
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function c33700387.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID()
end
function c33700387.ovfilter(c)
return c:IsFaceup() and c:IsRankAbove(4) and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c33700387.val(e,c)
return e:GetHandler():GetOverlayCount()*500
end
\ No newline at end of file
--虚拟YouTuber 东北 切蒲英
function c33700388.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--atk
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(33700388,0))
e6:SetCategory(CATEGORY_ATKCHANGE)
e6:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e6:SetCode(EVENT_SPSUMMON_SUCCESS)
e6:SetCost(c33700388.atkcost)
e6:SetOperation(c33700388.atkop)
c:RegisterEffect(e6)
end
function c33700388.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,2000) end
local lp=Duel.GetLP(tp)
local t={}
local f=math.floor((lp)/1000)
local l=2
while l<=f and l<=20 do
t[l]=l*1000
l=l+1
end
local announce=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,announce)
e:SetLabel(announce)
e:GetHandler():SetHint(CHINT_NUMBER,announce)
end
function c33700388.atkop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=e:GetLabel()
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
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_FINAL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCountLimit(1)
e2:SetLabel(ct)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetCondition(c33700388.reccon)
e2:SetTarget(c33700388.rectg)
e2:SetOperation(c33700388.recop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
e3:SetCondition(c33700388.con2)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetLabel(ct)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetCondition(c33700388.con3)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
e4:SetLabel(ct)
e4:SetValue(aux.tgoval)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33700388,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetCountLimit(1)
e5:SetRange(LOCATION_MZONE)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
e5:SetCondition(c33700388.con4)
e5:SetTarget(c33700388.tgtg)
e5:SetOperation(c33700388.tgop)
e5:SetLabel(ct)
c:RegisterEffect(e5)
end
function c33700388.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,g:GetCount(),0,0)
end
function c33700388.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToGrave,tp,0,LOCATION_ONFIELD+LOCATION_HAND,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
function c33700388.con4(e)
return e:GetLabel()>=8000
end
function c33700388.con3(e)
return e:GetLabel()>=5000
end
function c33700388.con2(e)
return e:GetLabel()>=4000
end
function c33700388.reccon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and e:GetHandler():GetAttack()>0 and e:GetLabel()>=3000
end
function c33700388.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetHandler():GetAttack()/2)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,e:GetAttack()/2)
end
function c33700388.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if not e:GetHandler():IsRelateToEffect(e) or e:GetHandler():IsFacedown() then return end
local atk=e:GetHandler():GetAttack()
Duel.Recover(p,atk/2,REASON_EFFECT)
end
--CALL OF THE VIRTUAL
function c33700389.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_ATTACK,TIMING_ATTACK)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700389,0))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c33700389.tgcon)
e2:SetTarget(c33700389.tgtg)
e2:SetOperation(c33700389.tgop)
c:RegisterEffect(e2)
--damage
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700389,1))
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(c33700389.damcon)
e3:SetTarget(c33700389.damtg)
e3:SetOperation(c33700389.damop)
c:RegisterEffect(e3)
end
function c33700389.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3000)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000)
end
function c33700389.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c33700389.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c33700389.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c33700389.tgfilter(c)
return c:IsSetCard(0x445) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c33700389.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700389.tgfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_EXTRA)
end
function c33700389.tgop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_EXTRA,0,nil)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=g:FilterSelect(1-tp,c33700389.tgfilter,1,1,nil):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
Duel.SkipPhase(1-tp,PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
else
Duel.Destroy(c,REASON_EFFECT)
end
end
...@@ -31,40 +31,61 @@ function scard.initial_effect(c) ...@@ -31,40 +31,61 @@ function scard.initial_effect(c)
e3:SetTargetRange(1, 0) e3:SetTargetRange(1, 0)
e3:SetValue(scard.efilter) e3:SetValue(scard.efilter)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--Special Summon token --cannot set
local e4 = Effect.CreateEffect(c) local e4 = Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetType(EFFECT_TYPE_IGNITION) e4:SetCode(EFFECT_CANNOT_SSET)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE) e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE) e4:SetTargetRange(1, 0)
e4:SetTarget(scard.tktg) e4:SetTarget(scard.setfilter)
e4:SetOperation(scard.tkop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
--cannot special summon --Special Summon token
local e5 = Effect.CreateEffect(c) local e5 = Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD) e5:SetCategory(CATEGORY_SPECIAL_SUMMON + CATEGORY_TOKEN)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_FZONE) e5:SetRange(LOCATION_FZONE)
e5:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON) e5:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e5:SetTarget(scard.tktg)
e5:SetTargetRange(1, 0) e5:SetOperation(scard.tkop)
e5:SetTarget(scard.splimit)
c:RegisterEffect(e5) c:RegisterEffect(e5)
--cannot link material --cannot special summon
local e6 = Effect.CreateEffect(c) local e6 = Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD) e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL) e6:SetRange(LOCATION_FZONE)
e6:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE) e6:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e6:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1)) e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetValue(1) e6:SetTargetRange(1, 0)
e6:SetTarget(scard.splimit)
c:RegisterEffect(e6) c:RegisterEffect(e6)
--release all --cannot link material
local e7 = Effect.CreateEffect(c) local e7 = Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_RECOVER) e7:SetType(EFFECT_TYPE_FIELD)
e7:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE) e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e7:SetCode(EVENT_LEAVE_FIELD) e7:SetTargetRange(LOCATION_MZONE, LOCATION_MZONE)
e7:SetTarget(scard.reltg) e7:SetTarget(aux.TargetBoolFunction(Card.IsCode, id + 1))
e7:SetOperation(scard.relop) e7:SetValue(1)
c:RegisterEffect(e7) c:RegisterEffect(e7)
--release all
local e8 = Effect.CreateEffect(c)
e8:SetCategory(CATEGORY_RECOVER)
e8:SetType(EFFECT_TYPE_TRIGGER_F + EFFECT_TYPE_SINGLE)
e8:SetCode(EVENT_LEAVE_FIELD)
e8:SetTarget(scard.reltg)
e8:SetOperation(scard.relop)
c:RegisterEffect(e8)
--oops tcg didn't ban cannon soldier
local e9 = Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CHANGE_DAMAGE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e9:SetRange(LOCATION_FZONE)
e9:SetTargetRange(1, 1)
e9:SetValue(scard.damval)
c:RegisterEffect(e9)
local ea = e9:Clone()
ea:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(ea)
if not scard.global_check then if not scard.global_check then
scard.global_check = true scard.global_check = true
scard[0] = 0 scard[0] = 0
...@@ -76,6 +97,9 @@ end ...@@ -76,6 +97,9 @@ end
function scard.efilter(e, re, tp) function scard.efilter(e, re, tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE) return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end end
function scard.setfilter(e, c)
return c:IsType(TYPE_FIELD)
end
function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk) function scard.regtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then if chk == 0 then
return true return true
...@@ -247,8 +271,9 @@ function scard.relfilter(c) ...@@ -247,8 +271,9 @@ function scard.relfilter(c)
end end
function scard.reltg(e, tp, eg, ep, ev, re, r, rp, chk) function scard.reltg(e, tp, eg, ep, ev, re, r, rp, chk)
scard.release_check = true scard.release_check = true
local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return not e:GetHandler():IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown()) return not c:IsLocation(LOCATION_DECK) and not (c:IsLocation(LOCATION_REMOVED) and c:IsFacedown())
end end
local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil) local g = Duel.GetMatchingGroup(scard.relfilter, tp, LOCATION_MZONE, LOCATION_MZONE, nil)
Duel.SetOperationInfo(0, CATEGORY_RELEASE, g, #g, 0, 0) Duel.SetOperationInfo(0, CATEGORY_RELEASE, g, #g, 0, 0)
...@@ -267,3 +292,9 @@ function scard.relop(e, tp, eg, ep, ev, re, r, rp) ...@@ -267,3 +292,9 @@ function scard.relop(e, tp, eg, ep, ev, re, r, rp)
end end
scard.release_check = false scard.release_check = false
end end
function scard.damval(e, re, val, r, rp, rc)
if r & REASON_EFFECT ~= 0 then
return 0
end
return val
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
--Lily White, Spring Caller
--AlphaKretin
--For Nemoma
local s = c33700412
local id = 33700412
local CTR_PETAL = 0x234
function s.initial_effect(c)
c:EnableCounterPermit(CTR_PETAL)
--synchro summon
c:EnableReviveLimit()
aux.AddSynchroProcedure(
c,
aux.FilterBoolFunction(aux.NOT(Card.IsAttribute, ATTRIBUTE_DARK)),
1,
1,
aux.NonTuner(aux.NOT(Card.IsAttribute), ATTRIBUTE_DARK),
2,
99
)
--indes
local e1 = Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--add counter
local e2 = Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id, 0))
e2:SetCategory(CATEGORY_COUNTER)
e2:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(s.ctcon)
e2:SetTarget(s.cttg)
e2:SetOperation(s.ctop)
c:RegisterEffect(e2)
--change target
local e3 = Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id, 1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(s.tgcon)
e3:SetTarget(s.tgtg)
e3:SetOperation(s.tgop)
c:RegisterEffect(e3)
--negate
local e4 = Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id, 2))
e4:SetCategory(CATEGORY_DISABLE + CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_BECOME_TARGET)
e4:SetCondition(s.negcon)
e4:SetTarget(s.negtg)
e4:SetOperation(s.negop)
c:RegisterEffect(e4)
--end battle phase
local e5 = Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id, 3))
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(s.bpcon)
e5:SetTarget(s.bptg)
e5:SetOperation(s.bpop)
c:RegisterEffect(e5)
end
function s.ctcon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function s.cttg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return true
end
Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 2, 0, CTR_PETAL)
end
function s.ctop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) then
c:AddCounter(CTR_PETAL, 2)
end
end
function s.tgcon(e, tp, eg, ep, ev, re, r, rp)
local g = Duel.GetChainInfo(ev, CHAININFO_TARGET_CARDS)
if (e == re) or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or (rp == tp) or not g or (#g ~= 1) then
return false
end
local tc = g:GetFirst()
return tc:IsOnField() and tc:IsLocation(LOCATION_MZONE) and not tc==e:GetHandler()
end
function s.tgtg(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local c = e:GetHandler()
local tf = re:GetTarget()
local res, ceg, cep, cev, cre, cr, crp = Duel.CheckEvent(re:GetCode(), true)
if chk == 0 then
return c:IsCanAddCounter(CTR_PETAL, 1) and tf(re, rp, ceg, cep, cev, cre, cr, crp, 0, c)
end
Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 1, 0, CTR_PETAL)
end
function s.tgop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:AddCounter(CTR_PETAL, 1) then
Duel.ChangeTargetCard(ev, Group.FromCards(c))
end
end
function s.negcon(e, tp, eg, ep, ev, re, r, rp)
return eg:IsContains(e:GetHandler()) and rp == (1 - tp)
end
function s.negtg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return e:GetHandler():IsCanRemoveCounter(tp, CTR_PETAL, 1, REASON_EFFECT)
end
Duel.SetOperationInfo(0, CATEGORY_DISABLE, eg, 1, 0, 0)
Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 1, 0, CTR_PETAL)
end
function s.negop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:RemoveCounter(tp, CTR_PETAL, 1, REASON_EFFECT) then
Duel.NegateEffect(ev)
end
end
function s.bpcon(e, tp, eg, ep, ev, re, r, rp)
return (Duel.GetTurnPlayer() ~= tp) and
(Duel.GetCurrentPhase() >= PHASE_BATTLE_START) and (Duel.GetCurrentPhase() <= PHASE_BATTLE)
end
function s.bptg(e, tp, eg, ep, ev, re, r, rp, chk)
if chk == 0 then
return e:GetHandler():IsCanRemoveCounter(tp, CTR_PETAL, 1, REASON_EFFECT)
end
Duel.SetOperationInfo(0, CATEGORY_COUNTER, nil, 1, 0, CTR_PETAL)
end
function s.bpop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
if c:IsRelateToEffect(e) and c:RemoveCounter(tp, CTR_PETAL, 1, REASON_EFFECT) then
Duel.SkipPhase(1 - tp, PHASE_BATTLE, RESET_PHASE + PHASE_BATTLE, 1)
end
end
...@@ -4,7 +4,7 @@ local cm=_G["c"..m] ...@@ -4,7 +4,7 @@ local cm=_G["c"..m]
if not RSVeVal then if not RSVeVal then
RSVeVal=RSVeVal or {} RSVeVal=RSVeVal or {}
rsve=RSVeVal rsve=RSVeVal
function rsve.addcounter(ct,chk,rc) function rsve.addcounter(tp,ct,chk,rc)
local g=Duel.GetMatchingGroup(rsve.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,rc) local g=Duel.GetMatchingGroup(rsve.ctfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,rc)
if chk then return g:GetCount()>0 end if chk then return g:GetCount()>0 end
if g:GetCount()<=0 then return end if g:GetCount()<=0 then return end
...@@ -87,7 +87,7 @@ function rsve.ctcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -87,7 +87,7 @@ function rsve.ctcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()==nil return Duel.GetAttacker()==e:GetHandler() and Duel.GetAttackTarget()==nil
end end
function rsve.ctop(e,tp,eg,ep,ev,re,r,rp) function rsve.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(4) rsve.addcounter(tp,4)
end end
function rsve.NormalSummonFunction(c,ct) function rsve.NormalSummonFunction(c,ct)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -126,7 +126,7 @@ function rsve.ToGraveFunction(c,ct,con,cost) ...@@ -126,7 +126,7 @@ function rsve.ToGraveFunction(c,ct,con,cost)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function rsve.ctop2(e,tp,eg,ep,ev,re,r,rp) function rsve.ctop2(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(e:GetLabel()) rsve.addcounter(tp,e:GetLabel())
end end
function rsve.AttackUpFunction(c,ct) function rsve.AttackUpFunction(c,ct)
-- --
...@@ -185,7 +185,7 @@ function cm.initial_effect(c) ...@@ -185,7 +185,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(4) rsve.addcounter(tp,4)
end end
function cm.spcon(e,c) function cm.spcon(e,c)
if c==nil then return true end if c==nil then return true end
......
...@@ -66,7 +66,7 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,7 +66,7 @@ function cm.efop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(4) rsve.addcounter(tp,4)
end end
function cm.rdcon(e,tp,eg,ep,ev,re,r,rp) function cm.rdcon(e,tp,eg,ep,ev,re,r,rp)
local ct=math.floor(ev/100) local ct=math.floor(ev/100)
......
...@@ -19,5 +19,5 @@ function cm.initial_effect(c) ...@@ -19,5 +19,5 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp) function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
rsve.addcounter(5) rsve.addcounter(tp,5)
end end
\ No newline at end of file
...@@ -36,6 +36,6 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp) ...@@ -36,6 +36,6 @@ function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local ct=tc:GetCounter(0x144b) local ct=tc:GetCounter(0x144b)
if ct>0 and tc:IsCanRemoveCounter(tp,0x144b,ct,REASON_EFFECT) and tc:RemoveCounter(tp,0x144b,ct,REASON_EFFECT) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then if ct>0 and tc:IsCanRemoveCounter(tp,0x144b,ct,REASON_EFFECT) and tc:RemoveCounter(tp,0x144b,ct,REASON_EFFECT) and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 then
rsve.addcounter(ct) rsve.addcounter(tp,ct)
end end
end end
\ No newline at end of file
...@@ -26,10 +26,10 @@ function cm.initial_effect(c) ...@@ -26,10 +26,10 @@ function cm.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cm.damcon1(e,tp,eg,ep,ev,re,r,rp) function cm.damcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp and Duel.GetCounter(tp,1,1,0x144b)>0
end end
function cm.damcon2(e,tp,eg,ep,ev,re,r,rp) function cm.damcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp return Duel.GetTurnPlayer()~=tp and Duel.GetCounter(tp,0,1,0x144b)>0
end end
function cm.damop(e,tp,eg,ep,ev,re,r,rp) function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,1,1,0x144b) local ct=Duel.GetCounter(tp,1,1,0x144b)
...@@ -39,7 +39,7 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -39,7 +39,7 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.damop2(e,tp,eg,ep,ev,re,r,rp) function cm.damop2(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetCounter(tp,1,1,0x144b) local ct=Duel.GetCounter(tp,0,1,0x144b)
if ct>0 and Duel.GetTurnPlayer()~=tp then if ct>0 and Duel.GetTurnPlayer()~=tp then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ct*100,REASON_EFFECT) Duel.Damage(1-tp,ct*100,REASON_EFFECT)
......
...@@ -17,7 +17,7 @@ function cm.thfilter(c) ...@@ -17,7 +17,7 @@ function cm.thfilter(c)
return c:IsSetCard(0x144b) and c:IsAbleToHand() return c:IsSetCard(0x144b) and c:IsAbleToHand()
end end
function cm.filter(c) function cm.filter(c)
return c:IsLevelAbove(1) and c:IsSetCard(0x144b) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and rsve.addcounter(c:GetLevel()*2,0) return c:IsLevelAbove(1) and c:IsSetCard(0x144b) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave() and rsve.addcounter(tp,c:GetLevel()*2,0)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil)
...@@ -50,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,7 +50,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND+LOCATION_EXTRA,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then if g:GetCount()>0 and Duel.SendtoGrave(g,REASON_EFFECT)~=0 then
rsve.addcounter(g:GetFirst():GetLevel()*2,nil,e:GetHandler()) rsve.addcounter(tp,g:GetFirst():GetLevel()*2,nil,e:GetHandler())
end end
end end
end end
\ No newline at end of file
...@@ -15,7 +15,7 @@ function cm.tgfilter(c) ...@@ -15,7 +15,7 @@ function cm.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0x144b) and c:GetCounter(0x144b)>0 return c:IsFaceup() and c:IsSetCard(0x144b) and c:GetCounter(0x144b)>0
end end
function cm.desfilter(c) function cm.desfilter(c)
return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAttackAbove(1) and rsve.addcounter(c:GetLevel(),0,c) return c:IsFaceup() and c:IsLevelAbove(1) and c:IsAttackAbove(1) and rsve.addcounter(tp,c:GetLevel(),0,c)
end end
function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,m)+1 local ct=Duel.GetMatchingGroupCount(Card.IsCode,tp,LOCATION_GRAVE,0,nil,m)+1
...@@ -23,8 +23,8 @@ function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,8 +23,8 @@ function cm.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil) local b2=Duel.IsExistingMatchingCard(cm.tgfilter,tp,LOCATION_ONFIELD,0,1,nil)
local b3=Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil) local b3=Duel.IsExistingMatchingCard(cm.desfilter,tp,LOCATION_MZONE,0,1,nil)
if chk==0 then return b1 or b2 or b3 end if chk==0 then return b1 or b2 or b3 end
for i=1,ct do
local sel={} local sel={}
for i=1,ct do
local ops={} local ops={}
local opval={} local opval={}
local off=1 local off=1
...@@ -73,10 +73,9 @@ function cm.damop(sel) ...@@ -73,10 +73,9 @@ function cm.damop(sel)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local tc=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst() local tc=Duel.SelectMatchingCard(tp,cm.desfilter,tp,LOCATION_MZONE,0,1,1,nil):GetFirst()
if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)~=0 then if tc and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.Damage(1-tp,tc:GetAttack(),REASON_EFFECT)~=0 then
rsve.addcounter(tc:GetLevel(),nil) rsve.addcounter(tp,tc:GetLevel(),nil)
end end
end end
end end
end end
end end
...@@ -95,5 +95,5 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp) ...@@ -95,5 +95,5 @@ function cm.damop(e,tp,eg,ep,ev,re,r,rp)
Duel.Damage(p,ct*50,REASON_EFFECT) Duel.Damage(p,ct*50,REASON_EFFECT)
end end
function cm.damcon(e,tp,eg,ep,ev,re,r,rp) function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()~=tp
end end
\ No newline at end of file
--铁虹的斥候
--Scrpited by Real_Scl
--saviorchaoslucifer@gmail.com
--15161685390@163.com
--Tencent QQ: 2798419987
local m=33700720
local cm=_G["c"..m]
if not RSNEONSVAL then
RSNEONSVAL=RSNEONSVAL or {}
rsneov=RSNEONSVAL
rsneov.LPTbl={[0]=0,[1]=0,[2]=0,[3]=0}
rsneov.LPTbl2={[0]=0,[1]=0}
function rsneov.TunerFun(c,lp)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetLabel(lp)
e1:SetCountLimit(1,c:GetOriginalCode())
e1:SetCost(rsneov.LPcost)
e1:SetOperation(rsneov.tunerop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function rsneov.LPcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,e:GetLabel()) end
Duel.PayLPCost(tp,e:GetLabel())
end
function rsneov.tunerop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(TYPE_TUNER)
c:RegisterEffect(e1)
end
function rsneov.LPChangeFun(c)
if Duel.GetFlagEffect(0,m)>0 then return end
Duel.RegisterFlagEffect(0,m,0,0,1)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PAY_LPCOST)
e1:SetOperation(rsneov.LPcheckop)
Duel.RegisterEffect(e1,0)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DAMAGE)
e2:SetValue(rsneov.LPcheckop2)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e3:SetOperation(rsneov.Lpclear)
Duel.RegisterEffect(e3,0)
end
function rsneov.LPcheckop(e,tp,eg,ep,ev,re,r,rp)
rsneov.LPTbl[ep]=rsneov.LPTbl[ep]+ev
local rc=re:GetHandler()
if rc:IsSetCard(0x44e) then
rsneov.LPTbl[ep+2]=rsneov.LPTbl[ep+2]+ev
end
end
function rsneov.LPcheckop2(e,tp,eg,ep,ev,re,r,rp)
rsneov.LPTbl2[ep]=rsneov.LPTbl2[ep]+ev
end
function rsneov.Lpclear(e,tp,eg,ep,ev,re,r,rp)
rsneov.LPTbl={[0]=0,[1]=0,[2]=0,[3]=0}
rsneov.LPTbl2={[0]=0,[1]=0}
end
function rsneov.RDTurnFun(c,cate,pro,lp,tg,op,notquick)
local code=c:GetOriginalCode()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(code,0))
if cate then
e1:SetCategory(cate)
end
if pro then
e1:SetProperty(pro)
end
local etype=notquick and EFFECT_TYPE_IGNITION or EFFECT_TYPE_QUICK_O
e1:SetType(etype)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,code+100)
if etype==EFFECT_TYPE_QUICK_O then
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
end
e1:SetLabel(lp)
e1:SetCost(rsneov.LPcost)
e1:SetCondition(function(e,tp) return rsneov.LPTbl[tp]+rsneov.LPTbl2[tp]>0 end)
if tg then
e1:SetTarget(tg)
end
if op then
e1:SetOperation(op)
end
c:RegisterEffect(e1)
end
function rsneov.LPCon(e)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)<Duel.GetLP(1-tp)
end
function rsneov.LPCon2(e)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)>Duel.GetLP(1-tp)
end
function rsneov.ToGraveCost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() end
Duel.SendtoGrave(c,REASON_COST)
end
end
----------------------------------
if cm then
function cm.initial_effect(c)
rsneov.TunerFun(c,900)
rsneov.RDTurnFun(c,CATEGORY_SPECIAL_SUMMON,nil,500,cm.tg,cm.op)
rsneov.LPChangeFun(c)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x44e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_HAND)
end
function cm.op(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.filter),tp,LOCATION_GRAVE+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
--铁虹的补给兵
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700721
local cm=_G["c"..m]
function cm.initial_effect(c)
rsneov.TunerFun(c,1200)
rsneov.RDTurnFun(c,CATEGORY_DRAW,nil,900,cm.tg,cm.op)
rsneov.LPChangeFun(c)
end
function cm.tg(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.op(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
\ No newline at end of file
--铁虹的狙击手
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700722
local cm=_G["c"..m]
function cm.initial_effect(c)
rsneov.TunerFun(c,1600)
rsneov.RDTurnFun(c,CATEGORY_TOGRAVE,nil,1200,cm.tg,cm.op)
rsneov.LPChangeFun(c)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,PLAYER_ALL,LOCATION_ONFIELD)
if Duel.GetLP(tp)<Duel.GetLP(1-tp) then
Duel.SetChainLimit(cm.chlimit)
end
end
function cm.chlimit(e,ep,tp)
return tp==ep
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
\ No newline at end of file
--铁虹的强袭兵
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700723
local cm=_G["c"..m]
function cm.initial_effect(c)
rsneov.TunerFun(c,1900)
rsneov.RDTurnFun(c,CATEGORY_DRAW,nil,1600,cm.tg,cm.op,true)
rsneov.LPChangeFun(c)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentPhase()==PHASE_MAIN1 end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
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)
if Duel.GetLP(tp)<Duel.GetLP(1-tp) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetTargetRange(0,1)
e2:SetValue(cm.aclimit)
e2:SetCondition(cm.actcon)
Duel.RegisterEffect(e2,tp)
end
end
end
function cm.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function cm.actcon(e)
return Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()
end
--铁虹弹阵
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700724
local cm=_G["c"..m]
function cm.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(rsneov.LPCon)
e1:SetCost(rsneov.ToGraveCost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.rfilter(c)
return c:IsReleasableByEffect() and c:GetTextDefense()>0 and c:IsSetCard(0x44e)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,cm.rfilter,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,nil,1,tp,LOCATION_MZONE)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,0)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectReleaseGroup(tp,cm.rfilter,1,1,nil,ATTRIBUTE_FIRE)
Duel.HintSelection(g)
local def=g:GetFirst():GetTextDefense()
if def<0 then def=0 end
if Duel.Release(g,REASON_COST)~=0 then
Duel.Damage(1-tp,def,REASON_EFFECT)
end
end
--铁虹杖座
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700725
local cm=_G["c"..m]
function cm.initial_effect(c)
--sp
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(rsneov.LPCon)
e1:SetCost(rsneov.ToGraveCost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x44e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetMZoneCount(tp,c,tp)>1
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND,0,2,c,e,tp) and not Duel.IsPlayerAffectedByEffect(tp,59822133) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=1 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,2,2,nil,e,tp)
if g:GetCount()==2 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--铁虹圣甲
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700726
local cm=_G["c"..m]
function cm.initial_effect(c)
--th
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,m)
e1:SetCondition(rsneov.LPCon)
e1:SetCost(rsneov.ToGraveCost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
function cm.filter(c)
return c:IsSetCard(0x44e) and c:IsAbleToHand()
end
function cm.target(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.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_DECK,0,nil)
local tg=Group.CreateGroup()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tc=g:Select(tp,1,1,nil):GetFirst()
tg:AddCard(tc)
g=g:Filter(Card.IsCode,tc,tc:GetCode())
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
local rg=g:Select(tp,1,2,nil)
tg:Merge(rg)
end
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
--铁虹之书
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700727
local cm=_G["c"..m]
function cm.initial_effect(c)
--atkup
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
--re
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DAMAGE+CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(rsneov.LPCon)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.rmtg)
e2:SetOperation(cm.rmop)
c:RegisterEffect(e2)
end
function cm.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE,0,1,e:GetHandler()) end
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_GRAVE,0,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
function cm.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,LOCATION_GRAVE,0,aux.ExceptThisCard(e))
if #g<=0 then return end
local ct=Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
if ct<=0 then return end
if Duel.SelectYesNo(1-tp,aux.Stringid(m,2)) then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,4))
Duel.Damage(1-tp,ct*200,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,3))
Duel.Recover(tp,ct*500,REASON_EFFECT)
end
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return d~=nil and d:IsFaceup() and ((a:GetControler()==tp and a:IsSetCard(0x44e) and a:IsRelateToBattle())
or (d:GetControler()==tp and d:IsSetCard(0x44e) and d:IsRelateToBattle()))
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and Duel.CheckLPCost(tp,1000) end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,3000)/1000)
local t={}
for i=1,m do
t[i]=i*1000
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:SetLabel(ac)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local a=Duel.GetAttacker()
if Duel.GetTurnPlayer()~=tp then a=Duel.GetAttackTarget() end
if not a:IsRelateToBattle() then return end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(e:GetLabel())
a:RegisterEffect(e1)
end
--铁虹的一色
local m=33700728
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.atkcon)
e1:SetCost(cm.atkcost)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--rec
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_BATTLE_DESTROYED)
e2:SetCondition(cm.reccon)
e2:SetTarget(cm.rectg)
e2:SetOperation(cm.recop)
c:RegisterEffect(e2)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function cm.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,100) end
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,3000)/100)
local t={}
for i=1,m do
t[i]=i*100
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:SetLabel(ac)
end
function cm.atkop(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:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e2)
end
end
--铁虹的二色
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700729
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--Atk update
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(rsneov.LPCon)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
--selfdes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(rsneov.LPCon2)
c:RegisterEffect(e3)
--rec
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DESTROYED)
e4:SetCondition(cm.reccon)
e4:SetTarget(cm.rectg)
e4:SetOperation(cm.recop)
c:RegisterEffect(e4)
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.reccon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE) and e:GetHandler():IsReason(REASON_BATTLE)
end
function cm.atkval(e,c)
local tp=c:GetControler()
return Duel.GetLP(1-tp)-Duel.GetLP(tp)
end
\ No newline at end of file
--铁虹的三色
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700730
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(Card.IsSetCard,0x44e),1)
c:EnableReviveLimit()
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--atk
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,m)
e2:SetCondition(rsneov.LPCon)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--res
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_RELEASE+CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetRange(LOCATION_MZONE)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCountLimit(1,m+100)
e5:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetTarget(cm.retg)
e5:SetOperation(cm.reop)
c:RegisterEffect(e5)
end
function cm.filter(c,e)
return c:IsFaceup() and c:IsAttackAbove(0)
end
function cm.filter2(c,e)
return c:IsCanBeEffectTarget(e) and c:IsReleasableByEffect()
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local rg=g:GetMaxGroup(Card.GetAttack)
if chkc then return rg:IsContains(chkc) end
if chk==0 then return rg:IsExists(cm.filter2,1,nil,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local rg2=rg:Select(tp,1,1,nil)
Duel.SetTargetCard(rg2)
Duel.SetOperationInfo(0,CATEGORY_RELEASE,rg2,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rg2:GetFirst():GetAttack())
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local atk=tc:GetAttack()
if Duel.Release(tc,REASON_EFFECT)~=0 and atk>0 then
Duel.Recover(tp,atk,REASON_EFFECT)
end
end
function cm.afilter(c,rc)
return c:IsFaceup() and c:GetAttack()~=rc:GetAttack()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and cm.afilter(chkc,c) end
if chk==0 then return Duel.IsExistingTarget(cm.afilter,tp,0,LOCATION_MZONE,1,nil,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,cm.afilter,tp,0,LOCATION_MZONE,1,1,nil,c)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and c:IsRelateToEffect(e) and c:IsFaceup() and c:GetAttack()~=tc:GetAttack() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
Duel.BreakEffect()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetValue(0)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
--铁虹的四色
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700731
local cm=_G["c"..m]
function cm.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(Card.IsSetCard,0x44e),1)
c:EnableReviveLimit()
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--rec
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCost(cm.recost)
e1:SetTarget(cm.retg)
e1:SetOperation(cm.reop)
c:RegisterEffect(e1)
--rec
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DAMAGE+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.nbcon)
e2:SetTarget(cm.nbtg)
e2:SetOperation(cm.nbop)
c:RegisterEffect(e2)
end
function cm.nbcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLP(1-tp)-Duel.GetLP(tp)>=10000
end
function cm.nbtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasableByEffect() end
Duel.SetOperationInfo(0,CATEGORY_RELEASE,c,1,0,0)
end
function cm.nbop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.Release(c,REASON_EFFECT)<=0 then return end
local rg=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,nil)
local b1=true
local b2=rg:GetCount()>0
if b1 and (not b2 or not Duel.SelectYesNo(1-tp,aux.Stringid(m,1))) then
Duel.Damage(1-tp,13370,REASON_EFFECT)
else
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
end
end
function cm.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemoveAsCost,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--铁虹的荣誉
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700732
local cm=_G["c"..m]
function cm.initial_effect(c)
rsneov.LPChangeFun(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return rsneov.LPTbl[tp+2]>=2000 end)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47435107,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCondition(function(e,tp) return rsneov.LPTbl[tp]>0 end)
e2:SetCost(aux.bfgcost)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp)
return c:IsSetCard(0x44e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsAttackBelow(rsneov.LPTbl[tp])
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_DECK,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,cm.filter,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 cm.activate(e)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EFFECT_LPCOST_REPLACE)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetCondition(cm.lrcon)
e1:SetOperation(cm.lrop)
Duel.RegisterEffect(e1,tp)
end
function cm.lrcon(e,tp,eg,ep,ev,re,r,rp)
if tp~=ep then return false end
if not re or not re:IsHasType(0x7e0) then return false end
local rc=re:GetHandler()
return rc:IsSetCard(0x44e) and rc:IsType(TYPE_MONSTER)
end
function cm.lrop(e,tp,eg,ep,ev,re,r,rp)
return
end
--绝命的同调
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700733
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_ATTACK)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCondition(cm.descon)
e3:SetOperation(cm.desop)
c:RegisterEffect(e3)
--sad
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(cm.loseop)
c:RegisterEffect(e4)
end
function cm.loseop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsFacedown() then return end
local effp=e:GetHandler():GetControler()
local WIN_REASON_RELAY_SOUL=0x1a
Duel.Win(1-effp,WIN_REASON_RELAY_SOUL)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetFirstCardTarget()
return tc and eg:IsContains(tc)
end
function cm.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function cm.filter(c,e,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil and Duel.GetAttacker():GetAttack()>Duel.GetLP(tp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCountFromEx(tp)>0
and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not Duel.NegateAttack() then return end
if Duel.GetLocationCountFromEx(tp)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_EXTRA,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc and Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(0)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
tc:RegisterEffect(e2)
Duel.SpecialSummonComplete()
c:SetCardTarget(tc)
end
end
--铁虹少女
if not pcall(function() require("expansions/script/c33700720") end) then require("script/c33700720") end
local m=33700734
local cm=_G["c"..m]
function cm.initial_effect(c)
--level
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetCondition(rsneov.LPCon2)
e1:SetValue(cm.lvval)
e1:SetLabel(-1)
c:RegisterEffect(e1)
--def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetCondition(rsneov.LPCon2)
e2:SetValue(cm.defval)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCondition(rsneov.LPCon)
e3:SetLabel(1)
c:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCondition(rsneov.LPCon)
e4:SetCode(EFFECT_UPDATE_ATTACK)
c:RegisterEffect(e4)
end
function cm.lvval(e,c)
local tp=c:GetControler()
local ct=Duel.GetLP(1-tp)-Duel.GetLP(tp)
local ct2=math.floor(ct/1000)
local ct3=math.min(ct2,3)
return ct3*e:GetLabel()
end
function cm.defval(e,c)
local tp=c:GetControler()
local ct=Duel.GetLP(1-tp)-Duel.GetLP(tp)
local ct2=math.floor(ct/1000)
local ct3=math.min(ct2,3)
return ct3*500
end
--霓虹之间
function c33700735.initial_effect(c)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700735,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_NO_TURN_RESET)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_REMOVE)
e2:SetCondition(c33700735.spcon)
e2:SetTarget(c33700735.sptg)
e2:SetOperation(c33700735.spop)
c:RegisterEffect(e2)
end
function c33700735.cfilter(c,tp)
return c:IsType(TYPE_TUNER) and c:IsPreviousLocation(LOCATION_GRAVE) and c:GetPreviousControler()==tp
end
function c33700735.spcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c33700735.cfilter,1,nil,tp)
end
function c33700735.filter(c,e,tp)
return c:IsCode(33700736) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700735.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700735.filter,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 c33700735.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,c33700735.filter,tp,LOCATION_DECK+LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
g:GetFirst():RegisterFlagEffect(33700736,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(33700735,1))
end
end
--来自未来之虹
function c33700736.initial_effect(c)
--tograve
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700736,0))
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c33700736.tgtg)
e1:SetOperation(c33700736.tgop)
c:RegisterEffect(e1)
--sp
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700736,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCondition(function(e) return e:GetHandler():IsPreviousLocation(LOCATION_GRAVE) end)
e2:SetTarget(c33700736.sptg)
e2:SetOperation(c33700736.spop)
c:RegisterEffect(e2)
end
function c33700736.filter(c,e,tp)
return c:IsRace(RACE_MACHINE) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsLevel(4) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700736.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(c33700736.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c33700736.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(c33700736.filter),tp,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
function c33700736.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_TUNER)
end
function c33700736.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c33700736.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33700736.tgfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=Duel.SelectTarget(tp,c33700736.tgfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,sg,1,0,0)
if e:GetHandler():GetFlagEffect(33700736)<=0 then
e:SetLabel(0)
else
e:SetLabel(1)
end
end
function c33700736.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc,c=Duel.GetFirstTarget(),e:GetHandler()
if Duel.IsChainDisablable(0) and e:GetLabel()==0 then
Duel.NegateEffect(0)
return
end
if tc:IsRelateToEffect(e) and Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)~=0 and c:IsRelateToEffect(e) and c:IsFaceup() then
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_FINAL)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
end
end
\ No newline at end of file
--铁全虹色
local m=33700737
local cm=_G["c"..m]
function cm.initial_effect(c)
aux.AddSynchroProcedure(c,aux.FilterBoolFunction(Card.IsLevelBelow,4),aux.NonTuner(nil),1)
c:EnableReviveLimit()
--synchro summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(cm.drcon)
e1:SetTarget(cm.drtarg)
e1:SetOperation(cm.drop)
c:RegisterEffect(e1)
--rec
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_RECOVER)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(cm.recost)
e2:SetTarget(cm.retg)
e2:SetOperation(cm.reop)
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_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(cm.spcon)
e3:SetCost(cm.spcost)
e3:SetTarget(cm.sptg)
e3:SetOperation(cm.spop)
c:RegisterEffect(e3)
end
function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_GRAVE,0,3,3,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.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 cm.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function cm.rmfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToRemoveAsCost()
end
function cm.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,cm.rmfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function cm.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,1000)
end
function cm.reop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_SYNCHRO)
end
function cm.drtarg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true 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)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
--虹之舞者
function c33700738.initial_effect(c)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700738,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,33700738)
e2:SetTarget(c33700738.thtg)
e2:SetOperation(c33700738.thop)
c:RegisterEffect(e2)
end
function c33700738.thfilter(c)
return c:IsType(TYPE_TUNER) and c:IsAbleToHand()
end
function c33700738.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700738.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c33700738.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33700738.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
--警告记过
local m=33700739
local cm=_G["c"..m]
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,5,nil) end)
e1:SetTarget(cm.tg)
e1:SetOperation(cm.op)
c:RegisterEffect(e1)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
local tg=g1:Filter(Card.IsAbleToHand,nil)
local g2=Duel.GetMatchingGroup(Card.IsCanBeSpecialSummoned,tp,LOCATION_DECK,0,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
local g3=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_DECK,0,nil)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(tp,LOCATION_SZONE)
if c:IsLocation(LOCATION_HAND) then ft2=ft2-1 end
local b1=#tg>0
local b2=(math.min(#g2,ft1)+math.min(#g3,ft2))>=#g1
local b3=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
if chk==0 then return Duel.CheckLPCost(tp,500) and (b1 or b3) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
local tg=g1:Filter(Card.IsAbleToHand,nil)
local g2=Duel.GetMatchingGroup(Card.IsCanBeSpecialSummoned,tp,LOCATION_DECK,0,nil,e,0,tp,false,false,POS_FACEDOWN_DEFENSE)
local g3=Duel.GetMatchingGroup(Card.IsSSetable,tp,LOCATION_DECK,0,nil)
local ft1=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ft2=Duel.GetLocationCount(tp,LOCATION_SZONE)
local b1=#tg>0
local b2=(math.min(#g2,ft1)+math.min(#g3,ft2))>=#g1
local b3=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
if #g1<=0 then return end
if not b1 and not b3 then return end
if not Duel.CheckLPCost(tp,500) then return end
Duel.PayLPCost(tp,500)
if b1 and (not b3 or not Duel.SelectYesNo(1-tp,aux.Stringid(m,0))) then
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,1))
Duel.SendtoHand(tg,nil,REASON_EFFECT)
else
Duel.Hint(HINT_OPSELECTED,tp,aux.Stringid(m,2))
if not b2 then return end
if not Duel.SelectYesNo(tp,aux.Stringid(m,3)) then return end
local g5,g6=Group.CreateGroup(),Group.CreateGroup()
for i=1,#g1 do
local g4=Group.CreateGroup()
if ft1>0 then g4:Merge(g2) end
if ft2>0 then g4:Merge(g3) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local tc=g4:Select(tp,1,1,nil):GetFirst()
if g2:IsContains(tc) then
g5:AddCard(tc)
g2:RemoveCard(tc)
ft1=ft1-1
else
g6:AddCard(tc)
g3:RemoveCard(tc)
ft2=ft2-1
end
end
if #g5>0 then
Duel.SpecialSummon(g5,0,tp,tp,false,false,POS_FACEDOWN_DEFENSE)
end
if #g6>0 then
Duel.SSet(tp,g6)
end
end
end
...@@ -123,7 +123,7 @@ function cm.indop(e,tp,eg,ep,ev,re,r,rp) ...@@ -123,7 +123,7 @@ function cm.indop(e,tp,eg,ep,ev,re,r,rp)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_IMMUNE_EFFECT) e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e1:SetValue(cm.efilter) e1:SetValue(cm.efilter)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
tc=g:GetNext() tc=g:GetNext()
......
...@@ -34,7 +34,7 @@ function rsvo.LPLinkFunction(c) ...@@ -34,7 +34,7 @@ function rsvo.LPLinkFunction(c)
end end
function rsvo.lmfilter(c,lc) function rsvo.lmfilter(c,lc)
local tp=lc:GetControler() local tp=lc:GetControler()
return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and (not c:IsType(TYPE_LINK) or c:GetLink()==1) and Duel.GetLocationCountFromEx(tp,tp,c)>0 return c:IsFaceup() and c:IsCanBeLinkMaterial(lc) and c:IsLinkRace(RACE_CYBERSE+RACE_MACHINE) and aux.MustMaterialCheck(c,tp,EFFECT_MUST_BE_LMATERIAL) and Duel.GetLocationCountFromEx(tp,tp,c)>0
end end
function rsvo.linkcon(e,c) function rsvo.linkcon(e,c)
if c==nil then return true end if c==nil then return true end
......
--守望少女
function c33700900.initial_effect(c)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PUBLIC)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
c:RegisterEffect(e3)
--discard limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_MZONE)
e5:SetTargetRange(0,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_GRAVE_AS_COST)
e6:SetRange(LOCATION_MZONE)
e6:SetTargetRange(0,LOCATION_HAND+LOCATION_ONFIELD)
e6:SetValue(1)
c:RegisterEffect(e6)
--rm
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700900,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_REMOVE)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(c33700900.rmtg)
e1:SetOperation(c33700900.rmop)
c:RegisterEffect(e1)
end
function c33700900.rmtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetLocation()==LOCATION_GRAVE and chkc:IsAbleToRemove() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,5,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function c33700900.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
Duel.Remove(sg,POS_FACEUP,REASON_EFFECT)
end
--~希望的磷光~ Niko
function c33700901.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700901,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_HAND)
e1:SetCondition(c33700901.spcon)
e1:SetTarget(c33700901.sptg)
e1:SetValue(33700901)
e1:SetOperation(c33700901.spop)
c:RegisterEffect(e1)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33700901,1))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetTarget(c33700901.rmtg)
e4:SetOperation(c33700901.rmop)
c:RegisterEffect(e4)
--td
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33700901,2))
e5:SetCategory(CATEGORY_TODECK)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_MZONE)
e5:SetCondition(c33700901.tdcon)
e5:SetTarget(c33700901.tdtg)
e5:SetOperation(c33700901.tdop)
c:RegisterEffect(e5)
end
function c33700901.tdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0
end
function c33700901.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToDeck() end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
end
function c33700901.tdop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SendtoDeck(c,nil,2,REASON_EFFECT)
end
function c33700901.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re and re:GetValue()==33700901 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c33700901.rmop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if not tc then return end
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)<=0 then return end
local atk,def=tc:GetTextAttack(),tc:GetTextDefense()
if tc:IsType(TYPE_MONSTER) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e2:SetValue(atk)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_BASE_DEFENSE)
e3:SetValue(def)
c:RegisterEffect(e3)
if tc:IsType(TYPE_EFFECT) then
c:CopyEffect(tc:GetOriginalCodeRule(),RESET_EVENT+RESETS_STANDARD)
end
else
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
end
end
function c33700901.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.GetTurnCount()==0 then return end
return c:IsPreviousLocation(LOCATION_GRAVE+LOCATION_DECK)
end
function c33700901.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,true,true) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c33700901.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,true,true,POS_FACEUP)
end
\ No newline at end of file
--磷光的荒野 ~旅途开始之地~
function c33700902.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c33700902.condition)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_FZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c33700902.aclimit)
c:RegisterEffect(e2)
end
function c33700902.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)==0
end
function c33700902.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) and Duel.GetFieldGroupCount(re:GetHandlerPlayer(),LOCATION_MZONE,0)<=0
end
--青之峡谷 ~沉没的梦迹~
function c33700903.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
c:RegisterEffect(e1)
--discard limit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetRange(LOCATION_SZONE)
e5:SetTargetRange(1,1)
e5:SetCode(EFFECT_CANNOT_DISCARD_HAND)
e5:SetValue(1)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_GRAVE)
e6:SetRange(LOCATION_SZONE)
e6:SetTargetRange(LOCATION_HAND,LOCATION_HAND)
e6:SetValue(1)
c:RegisterEffect(e6)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetTarget(c33700903.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
end
function c33700903.disable(e,c)
return not c:IsType(TYPE_MONSTER)
end
--避难之城 ~小心往目标行进~
function c33700904.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
c:RegisterEffect(e1)
--eee
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_DESTROYED)
e2:SetOperation(c33700904.operation)
c:RegisterEffect(e2)
end
function c33700904.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
for tc in aux.Next(eg) do
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c33700904.distg)
e1:SetLabel(tc:GetOriginalCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetCondition(c33700904.discon)
e2:SetOperation(c33700904.disop)
e2:SetLabel(tc:GetOriginalCode())
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c33700904.distg(e,c)
local code=e:GetLabel()
local code1,code2=c:GetOriginalCodeRule()
return code1==code or code2==code
end
function c33700904.discon(e,tp,eg,ep,ev,re,r,rp)
local code=e:GetLabel()
local code1,code2=re:GetHandler():GetOriginalCodeRule()
return code1==code or code2==code
end
function c33700904.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
--终点的高塔 ~无穷的次元壁~
function c33700905.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c33700905.activate)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetTarget(c33700905.disable)
e2:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e2)
--act limit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,1)
e3:SetValue(c33700905.aclimit)
c:RegisterEffect(e3)
end
function c33700905.disable(e,c)
return c~=e:GetHandler()
end
function c33700905.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e)
end
function c33700905.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not e:IsHasType(EFFECT_TYPE_ACTIVATE) then return end
if not c:IsRelateToEffect(e) then return end
local fid=c:GetFieldID()
c:RegisterFlagEffect(33700905,RESET_EVENT+RESETS_STANDARD,0,1,fid)
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(c)
e1:SetCondition(c33700905.tgcon)
e1:SetOperation(c33700905.tgop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c33700905.tgcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
return tc:GetFlagEffectLabel(33700905)==e:GetLabel()
end
function c33700905.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.SendtoGrave(tc,REASON_EFFECT)
end
\ No newline at end of file
--回家吧。 ~旅途的终结~
function c33700906.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(c33700906.condition)
e1:SetTarget(c33700906.target)
e1:SetOperation(c33700906.operation)
c:RegisterEffect(e1)
end
function c33700906.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c33700906.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_GRAVE)
end
function c33700906.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<=0 then return end
Duel.ConfirmCards(1-tp,g)
local codetbl={}
for tc in aux.Next(g) do
codetbl[#codetbl+1]=tc:GetCode()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetLabel(#g)
e1:SetCondition(c33700906.thcon(codetbl))
e1:SetOperation(c33700906.thop)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c33700906.thcon(codetbl)
return function(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
for _,code in ipairs(codetbl) do
if not g:IsExists(Card.IsCode,1,nil,code) then return false end
end
return true
end
end
function c33700906.thop(e,tp)
local b1=true
local b2=Duel.IsExistingMatchingCard(Card.IsAbleToHand,tp,LOCATION_GRAVE,0,e:GetLabel(),nil)
Duel.Hint(HINT_CARD,0,33700906)
if b1 and (not b2 or not Duel.SelectYesNo(1-tp,aux.Stringid(33700906,0))) then
Duel.Damage(1-tp,e:GetLabel()*800,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_GRAVE,0,e:GetLabel(),e:GetLabel(),nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
--断罪的天火
function c33700907.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33700907.damtg)
e1:SetOperation(c33700907.damop)
c:RegisterEffect(e1)
end
function c33700907.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_GRAVE,0)>0 end
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ct=g:FilterCount(c33700907.cfilter,nil,g)
Duel.SetTargetPlayer(1-tp)
if ct==#g then
Duel.SetTargetParam(ct*100)
else
Duel.SetTargetParam(ct*50)
end
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c33700907.cfilter(c,g)
return not g:IsExists(Card.IsCode,1,c,c:GetCode())
end
function c33700907.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
local ct=g:FilterCount(c33700907.cfilter,nil,g)
local dam=0
if ct==#g then
dam=ct*100
else
dam=ct*50
end
Duel.Damage(p,dam,REASON_EFFECT)
end
\ No newline at end of file
--究级陷阱·神圣结界
function c33700908.initial_effect(c)
c:SetUniqueOnField(1,0,33700908)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(0)
c:RegisterEffect(e2)
--def
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SET_DEFENSE_FINAL)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetValue(function(e,c) return c:GetDefense()*2 end)
c:RegisterEffect(e3)
--immune
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_IMMUNE_EFFECT)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(LOCATION_MZONE,0)
e4:SetTarget(aux.TargetBoolFunction(Card.IsDefenseAbove,5000))
e4:SetValue(c33700908.efilter)
c:RegisterEffect(e4)
end
function c33700908.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
--捉鬼萝莉队
function c33700909.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_DETACH_EVENT)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c33700909.condition)
e1:SetTarget(c33700909.target)
e1:SetOperation(c33700909.activate)
c:RegisterEffect(e1)
if not c33700909.global_check then
c33700909.global_check=true
c33700909[0]=nil
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DISCARD)
ge1:SetOperation(c33700909.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_TO_GRAVE)
Duel.RegisterEffect(ge2,0)
end
end
function c33700909.cfilter(c)
return c:IsPreviousLocation(LOCATION_HAND) and c:IsReason(REASON_COST)
end
function c33700909.checkop(e,tp,eg,ep,ev,re,r,rp)
local cid=Duel.GetCurrentChain()
for tc in aux.Next(eg) do
local p=tc:GetPreviousControler()
if tc:IsPreviousLocation(LOCATION_HAND) and tc:IsReason(REASON_COST) then
if cid>0 then
c33700909[p]=Duel.GetChainInfo(cid,CHAININFO_CHAIN_ID)
end
end
end
end
function c33700909.condition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)==c33700909[rp] and Duel.IsChainDisablable(ev)
end
function c33700909.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c33700909.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateEffect(ev) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetCode(re:GetHandler():GetCode())
e1:SetValue(c33700909.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c33700909.aclimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel()) and not re:GetHandler():IsImmuneToEffect(e)
end
--无能狂怒
function c33700910.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c33700910.condition)
e1:SetTarget(c33700910.target)
e1:SetOperation(c33700910.activate)
c:RegisterEffect(e1)
end
function c33700910.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c33700910.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function c33700910.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(tc:GetAttack()*3)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(tc:GetDefense()*3)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
local e4=Effect.CreateEffect(e:GetHandler())
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e4:SetValue(1)
e4:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e4)
end
end
--最终的勇气
function c33700911.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return Duel.GetTurnCount(tp)>=5 end)
e1:SetOperation(c33700911.activate)
c:RegisterEffect(e1)
if c33700911.counter==nil then
c33700911.counter=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetOperation(c33700911.addcount)
Duel.RegisterEffect(e3,0)
end
end
function c33700911.addcount(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,33700911,0,0,0)
Duel.RegisterFlagEffect(1-ep,33700911,0,0,0)
end
function c33700911.activate(e,tp,eg,ep,ev,re,r,rp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e2:SetOperation(c33700911.dop)
Duel.RegisterEffect(e2,tp)
end
function c33700911.dop(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp and Duel.GetFlagEffect(tp,33700911)>=10 then
Duel.ChangeBattleDamage(ep,10000)
e:Reset()
end
end
\ No newline at end of file
--战争吼叫
function c33700912.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DRAW)
e1:SetCondition(c33700912.condition)
e1:SetTarget(c33700912.target)
e1:SetOperation(c33700912.activate)
c:RegisterEffect(e1)
end
function c33700912.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function c33700912.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,3000)
end
function c33700912.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.Damage(tp,3000,REASON_EFFECT)>0 then
Duel.Draw(p,d,REASON_EFFECT)
end
Duel.BreakEffect()
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
--永远的三日天下
function c33700913.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33700913.cost)
e1:SetTarget(c33700913.target)
c:RegisterEffect(e1)
--indes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetCondition(function(e) return Duel.GetFlagEffect(e:GetHandlerPlayer(),33700913)<=0 and Duel.GetTurnPlayer()==e:GetHandlerPlayer() end)
e2:SetValue(1)
c:RegisterEffect(e2)
local e4=e2:Clone()
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCondition(function(e) return Duel.GetFlagEffect(1-e:GetHandlerPlayer(),33700913)<=0 and Duel.GetTurnPlayer()==1-e:GetHandlerPlayer() end)
c:RegisterEffect(e4)
--immune
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_IMMUNE_EFFECT)
e3:SetRange(LOCATION_FZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetCondition(function(e) return Duel.GetFlagEffect(e:GetHandlerPlayer(),33700913)<=0 and Duel.GetTurnPlayer()==e:GetHandlerPlayer() end)
e3:SetValue(c33700913.efilter)
c:RegisterEffect(e3)
local e5=e3:Clone()
e5:SetTargetRange(0,LOCATION_ONFIELD)
e5:SetCondition(function(e) return Duel.GetFlagEffect(1-e:GetHandlerPlayer(),33700913)<=0 and Duel.GetTurnPlayer()==1-e:GetHandlerPlayer() end)
c:RegisterEffect(e5)
if c33700913.counter==nil then
c33700913.counter=true
c33700913[0]=0
c33700913[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c33700913.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_CHAINING)
e3:SetOperation(c33700913.addcount)
Duel.RegisterEffect(e3,0)
end
end
function c33700913.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c33700913.resetcount(e,tp,eg,ep,ev,re,r,rp)
if c33700913[0]>0 then Duel.RegisterFlagEffect(0,33700913,RESET_PHASE+PHASE_END,0,1) end
if c33700913[1]>0 then Duel.RegisterFlagEffect(1,33700913,RESET_PHASE+PHASE_END,0,1) end
c33700913[0]=0
c33700913[1]=0
end
function c33700913.addcount(e,tp,eg,ep,ev,re,r,rp)
c33700913[rp]=c33700913[rp]+1
end
function c33700913.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,3000) end
Duel.PayLPCost(tp,3000)
end
function c33700913.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetLabel(3)
e1:SetCountLimit(1)
e1:SetCondition(c33700913.tgcon)
e1:SetOperation(c33700913.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,3)
e:GetHandler():RegisterEffect(e1)
end
function c33700913.tgcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c33700913.tgop(e,tp,eg,ep,ev,re,r,rp)
local ct=e:GetLabel()
ct=ct-1
e:SetLabel(ct)
if ct==0 then
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
Duel.Recover(tp,3000,REASON_EFFECT)
end
end
--迎春的弹幕开花宣言
function c33700914.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--adjust
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c33700914.adjustop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700914,0))
e3:SetCategory(CATEGORY_RECOVER)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetCost(c33700914.reccost)
e3:SetCondition(c33700914.reccon)
e3:SetTarget(c33700914.rectg)
e3:SetOperation(c33700914.recop)
c:RegisterEffect(e3)
--atk
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33700914,1))
e4:SetCategory(CATEGORY_ATKCHANGE)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e4:SetRange(LOCATION_SZONE)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetCost(c33700914.reccost)
e4:SetCondition(c33700914.reccon2)
e4:SetTarget(c33700914.atktg)
e4:SetOperation(c33700914.atkop)
c:RegisterEffect(e4)
end
function c33700914.adjustop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c33700914.cfilter,tp,LOCATION_ONFIELD,0,nil)
if #g>=2 and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<=0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c33700914.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetCard(eg:GetFirst())
end
function c33700914.atkop(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) or tc:IsFacedown() then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_OPPO_TURN,2)
e1:SetValue(ev)
tc:RegisterEffect(e1)
end
function c33700914.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(33700914)==0 end
c:RegisterFlagEffect(33700914,RESET_CHAIN,0,1)
end
function c33700914.reccon2(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp) and Duel.IsExistingMatchingCard(c33700914.cfilter,tp,LOCATION_ONFIELD,0,2,nil)
end
function c33700914.cfilter(c)
return c:IsCode(33700914) and c:IsFaceup()
end
function c33700914.reccon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and eg:GetFirst():IsControler(tp)
end
function c33700914.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ev)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
end
function c33700914.recop(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.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--闪亮的流星遗产,坠落于许愿之地
function c33700915.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCategory(CATEGORY_TODECK+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP)
e1:SetCondition(c33700915.condition)
e1:SetTarget(c33700915.target)
e1:SetOperation(c33700915.activate)
c:RegisterEffect(e1)
end
function c33700915.condition(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated())
end
function c33700915.filter(c,tp,rc)
local g=Group.FromCards(c,rc)
return c:IsLevel(4) and c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_MACHINE) and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_HAND,0,1,g)
end
function c33700915.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c33700915.filter(chkc,tp,c) end
if chk==0 then return Duel.IsExistingTarget(c33700915.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,tp,c) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c33700915.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp,c)
g:AddCard(c)
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_HAND,0,g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,tg,#tg,0,0)
end
function c33700915.activate(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetFirstTarget()
local c=e:GetHandler()
local g=Group.CreateGroup()
if tc:IsRelateToEffect(e) then g:AddCard(tc) end
if c:IsRelateToEffect(e) then g:AddCard(c) end
local tg=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD+LOCATION_HAND,0,g)
if #tg<=0 or Duel.SendtoDeck(tg,nil,2,REASON_EFFECT)<=0 then return end
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local b1=tc:IsFaceup() and tc:IsRelateToEffect(e)
local b2=true
if b1 and not Duel.SelectYesNo(tp,aux.Stringid(33700915,0)) then
local g=Duel.GetMatchingGroup(c33700915.cfilter,tp,LOCATION_DECK,0,nil)
local dcount=Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)
local seq=-1
local gc=g:GetFirst()
local atk,def=0,0
local ccard=nil
local ct=0
while gc do
if gc:GetSequence()>seq then
seq=gc:GetSequence()
ccard=gc
end
gc=g:GetNext()
end
if seq==-1 then
Duel.ConfirmDecktop(tp,dcount)
local tg=Duel.GetDecktopGroup(tp,dcount)
atk,def=tg:GetSum(Card.GetAttack),tg:GetSum(Card.GetDefense)
ct=dcount
else
Duel.ConfirmDecktop(tp,dcount-seq)
local tg=Duel.GetDecktopGroup(tp,dcount-seq-1)
atk,def=tg:GetSum(Card.GetAttack),tg:GetSum(Card.GetDefense) ct=dcount-seq
end
Duel.ShuffleDeck(tp)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(atk)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetValue(def)
tc:RegisterEffect(e2)
else
repeat
Duel.ConfirmDecktop(tp,1)
local gc=Duel.GetDecktopGroup(tp,1):GetFirst()
if gc:IsLevel(4) and gc:IsAttribute(ATTRIBUTE_LIGHT) and gc:IsRace(RACE_MACHINE) then
Duel.DisableShuffleCheck()
Duel.SendtoGrave(gc,REASON_EFFECT+REASON_REVEAL)
if gc:IsLocation(LOCATION_GRAVE) then
Duel.Damage(1-tp,gc:GetAttack(),REASON_EFFECT)
else
break
end
else
break
end
until not Duel.IsPlayerCanDiscardDeck(tp,1) or Duel.GetLP(1-tp)<=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetOperation(function(e,tp) Duel.SetLP(tp,0) end)
Duel.RegisterEffect(e2,tp)
end
end
function c33700915.cfilter(c)
return not c:IsLevel(4) or not c:IsAttribute(ATTRIBUTE_LIGHT) or not c:IsRace(RACE_MACHINE)
end
\ No newline at end of file
--轻飘飘★救济
function c33700916.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--rec
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33700916,0))
e4:SetCategory(CATEGORY_RECOVER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_FZONE)
e4:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_PLAYER_TARGET)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e4:SetCost(c33700916.cost)
e4:SetTarget(c33700916.rectg)
e4:SetOperation(c33700916.recop)
c:RegisterEffect(e4)
--ad
local e5=e4:Clone()
e5:SetDescription(aux.Stringid(33700916,1))
e5:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e5:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_CARD_TARGET)
e5:SetTarget(c33700916.adtg)
e5:SetOperation(c33700916.adop)
c:RegisterEffect(e5)
--ct
local e6=e4:Clone()
e6:SetDescription(aux.Stringid(33700916,2))
e6:SetCategory(CATEGORY_COUNTER)
e6:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_CARD_TARGET)
e6:SetTarget(c33700916.cttg)
e6:SetOperation(c33700916.ctop)
c:RegisterEffect(e6)
end
function c33700916.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700916.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10113040.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function c33700916.cfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsType(TYPE_MONSTER)
end
function c33700916.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x1049)
end
function c33700916.ctop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
tc:AddCounter(0x1049,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetCondition(function(e) return e:GetHandler():GetCounter(0x1049)>0 end)
e1:SetValue(c33700916.efilter)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e2:SetReset(RESET_EVENT+RESETS_REDIRECT)
e2:SetValue(LOCATION_REMOVED)
e2:SetCondition(function(e) return e:GetHandler():GetCounter(0x1049)>0 end)
tc:RegisterEffect(e2,true)
end
end
function c33700916.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer()
end
function c33700916.adtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c33700916.adop(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 tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(300)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e2)
end
end
function c33700916.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c33700916.recop(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.Recover(p,d,REASON_EFFECT)
end
\ No newline at end of file
--黑白的迎春妖精
function c33700917.initial_effect(c)
--synchro summon
aux.AddSynchroMixProcedure(c,aux.Tuner(Card.IsAttribute,ATTRIBUTE_LIGHT),aux.Tuner(Card.IsAttribute,ATTRIBUTE_LIGHT),nil,c33700917.synfilter,2,99)
c:EnableReviveLimit()
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(c33700917.efilter)
c:RegisterEffect(e1)
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e4)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700917,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(c33700917.eqtg)
e2:SetOperation(c33700917.eqop)
c:RegisterEffect(e2)
--recover
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(33700917,1))
e5:SetCategory(CATEGORY_RECOVER)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_PZONE)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetCountLimit(1)
e5:SetTarget(c33700917.rctg)
e5:SetOperation(c33700917.rcop)
c:RegisterEffect(e5)
--neg
local e21=Effect.CreateEffect(c)
e21:SetDescription(aux.Stringid(33700917,2))
e21:SetCategory(CATEGORY_SPECIAL_SUMMON)
e21:SetType(EFFECT_TYPE_QUICK_O)
e21:SetRange(LOCATION_MZONE)
e21:SetCode(EVENT_BECOME_TARGET)
e21:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e21:SetCost(c33700917.cost)
e21:SetCondition(c33700917.negcon1)
e21:SetTarget(c33700917.negtg1)
e21:SetOperation(c33700917.negop1)
c:RegisterEffect(e21)
local e31=e21:Clone()
e31:SetDescription(aux.Stringid(33700917,3))
e31:SetCode(EVENT_BE_BATTLE_TARGET)
e31:SetCondition(c33700917.negcon2)
e31:SetTarget(aux.TRUE)
e31:SetOperation(c33700917.negop2)
c:RegisterEffect(e31)
--spsummon
local e42=Effect.CreateEffect(c)
e42:SetDescription(aux.Stringid(33700917,4))
e42:SetCategory(CATEGORY_SPECIAL_SUMMON)
e42:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e42:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e42:SetCode(EVENT_LEAVE_FIELD)
e42:SetCondition(c33700917.spcon)
e42:SetTarget(c33700917.sptg)
e42:SetOperation(c33700917.spop)
c:RegisterEffect(e42)
end
function c33700917.synfilter(c,sync)
return c:IsNotTuner(sync) and not c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c33700917.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
end
function c33700917.spfilter(c,e,tp,sync)
return c:IsControler(tp) and c:IsLocation(LOCATION_GRAVE)
and bit.band(c:GetReason(),0x80008)==0x80008 and c:GetReasonCard()==sync
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700917.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local mg=c:GetMaterial()
local ct=mg:GetCount()
if chk==0 then return c:IsSummonType(SUMMON_TYPE_SYNCHRO)
and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and ct>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>=ct
and mg:FilterCount(c33700917.spfilter,nil,e,tp,c)==ct end
Duel.SetTargetCard(mg)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,mg,ct,0,0)
end
function c33700917.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,59822133) then return end
local c=e:GetHandler()
local mg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local g=mg:Filter(Card.IsRelateToEffect,nil,e)
if g:GetCount()<mg:GetCount() then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<g:GetCount() then return end
Duel.SpecialSummon(mg,0,tp,tp,false,false,POS_FACEUP)
end
function c33700917.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c33700917.negtg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsChainDisablable(ev) end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
end
function c33700917.negop1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function c33700917.negop2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateAttack()
end
function c33700917.negcon1(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function c33700917.negcon2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler()) and Duel.GetAttacker():IsControler(1-tp)
end
function c33700917.rctg(e,tp,eg,ep,ev,re,r,rp,chk)
local atk=e:GetHandler():GetAttack()
if chk==0 then return atk>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(atk)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
end
function c33700917.rcop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local atk=e:GetHandler():GetAttack()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,atk,REASON_EFFECT)
end
function c33700917.efilter(e,te)
local c=e:GetHandler()
local ec=te:GetHandler()
if te:GetOwner()==e:GetOwner() then return false end
if ec:IsHasCardTarget(c) or (te:IsHasType(EFFECT_TYPE_ACTIONS) and te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and c:IsRelateToEffect(te)) then return false
end
return true
end
function c33700917.eqfilter(c)
return c:IsType(TYPE_MONSTER)
end
function c33700917.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c33700917.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c33700917.eqfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c33700917.eqfilter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function c33700917.eqlimit(e,c)
return e:GetOwner()==c
end
function c33700917.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
if c:IsFaceup() and c:IsRelateToEffect(e) then
local atk=tc:GetTextAttack()
local def=tc:GetTextDefense()
if atk<0 then atk=0 end
if def<0 then def=0 end
if not Duel.Equip(tp,tc,c,false) then return end
e:SetLabelObject(tc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c33700917.eqlimit)
tc:RegisterEffect(e1)
if atk>0 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetValue(atk)
tc:RegisterEffect(e2)
end
if def>0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_OWNER_RELATE)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(def)
tc:RegisterEffect(e3)
end
else Duel.SendtoGrave(tc,REASON_RULE) end
end
end
\ No newline at end of file
--梦想愿现 ~Wish Into Reality~
function c33700918.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--th
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e,tp) return Duel.GetTurnPlayer()==tp end)
e3:SetTarget(c33700918.thtg)
e3:SetOperation(c33700918.thop)
c:RegisterEffect(e3)
if c33700918.counter==nil then
c33700918.counter=true
c33700918[0]={}
c33700918[1]={}
c33700918[2]={}
c33700918[3]={}
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c33700918.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_TO_HAND)
e3:SetOperation(c33700918.addcount)
Duel.RegisterEffect(e3,0)
local e4=e3:Clone()
e4:SetCode(EVENT_TO_GRAVE)
e4:SetOperation(c33700918.addcount2)
Duel.RegisterEffect(e4,0)
end
end
function c33700918.thfilter(c)
for _,code in ipairs(c33700918[c:GetControler()+2]) do
if code==c:GetCode() and c:IsAbleToHand() then return true end
end
return false
end
function c33700918.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c33700918.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c33700918.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c33700918.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c33700918.thop(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) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c33700918.resetcount(e,tp,eg,ep,ev,re,r,rp)
c33700918[0]={}
c33700918[1]={}
c33700918[2]={}
c33700918[3]={}
end
function c33700918.cfilter(c)
return not c:IsReason(REASON_DRAW)
end
function c33700918.addcount(e,tp,eg,ep,ev,re,r,rp)
local tg=eg:Filter(c33700918.cfilter,nil)
if #tg<=0 then return end
for tc in aux.Next(tg) do
table.insert(c33700918[tc:GetControler()],tc:GetCode())
end
end
function c33700918.addcount2(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
for _,code in ipairs(c33700918[tc:GetControler()]) do
if code==tc:GetCode() then
table.insert(c33700918[tc:GetControler()+2],tc:GetCode())
end
end
end
end
--梦想愿绘 ~Drafting Reality~
function c33700919.initial_effect(c)
c:EnableCounterPermit(0x1b)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33700919.target)
c:RegisterEffect(e1)
--conf
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e7:SetCode(EVENT_DRAW)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_SZONE)
e7:SetCondition(function(e,tp,eg,ep,ev,re,r,rp) return ep==tp end)
e7:SetOperation(c33700919.cfop)
c:RegisterEffect(e7)
e7:SetLabelObject(e1)
--b2
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetHintTiming(0,0x1e0)
e3:SetCost(c33700919.thcost)
e3:SetTarget(c33700919.thtg)
e3:SetOperation(c33700919.thop)
c:RegisterEffect(e3)
e3:SetLabelObject(e1)
end
function c33700919.thfilter(c,code)
return c:IsCode(code) and c:IsAbleToHand()
end
function c33700919.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700919.filter,tp,LOCATION_DECK,0,1,nil,e:GetLabelObject():GetLabel()) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c33700919.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c33700919.filter,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
function c33700919.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1b)>0 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
e:SetLabel(e:GetLabelObject():GetLabel())
end
function c33700919.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
local ac=Duel.AnnounceCard(tp)
e1:SetLabel(ac)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,ANNOUNCE_CARD)
end
function c33700919.cfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_CARD,0,33700919)
Duel.ConfirmCards(1-tp,eg)
e:GetHandler():AddCounter(0x1b,#eg)
local ct=eg:FilterCount(Card.IsCode,nil,e:GetLabelObject():GetLabel())
if ct>0 and Duel.Recover(tp,c:GetCounter(0x1b)*1000,REASON_EFFECT)~=0 then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
\ No newline at end of file
--掘地求生
function c33700920.initial_effect(c)
c:SetUniqueOnField(1,0,33700920)
c:EnableCounterPermit(0x1b)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--ct
local e8=Effect.CreateEffect(c)
e8:SetDescription(aux.Stringid(33700920,0))
e8:SetCategory(CATEGORY_COUNTER)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e8:SetCode(EVENT_PHASE+PHASE_STANDBY)
e8:SetCountLimit(1)
e8:SetRange(LOCATION_SZONE)
e8:SetOperation(c33700920.rtdop)
c:RegisterEffect(e8)
--dam
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_dam)
e5:SetDescription(aux.Stringid(33700920,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e5:SetCode(EVENT_DESTROYED)
e5:SetCondition(c33700920.damcon)
e5:SetTarget(c33700920.damtg)
e5:SetOperation(c33700920.damop)
c:RegisterEffect(e5)
e5:SetLabel(0)
--ssssss
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e6:SetCode(EVENT_LEAVE_FIELD_P)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetRange(LOCATION_SZONE)
e6:SetOperation(c33700920.addop)
c:RegisterEffect(e6)
e6:SetLabelObject(e5)
--b2
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700920,2))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetHintTiming(0,0x1e0)
e3:SetCost(c33700920.descost)
e3:SetTarget(c33700920.destg)
e3:SetOperation(c33700920.desop)
c:RegisterEffect(e3)
end
function c33700920.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_DECK+LOCATION_EXTRA,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c33700920.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_DECK+LOCATION_EXTRA,nil)
if Duel.Destroy(g,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,nil) and Duel.SelectYesNo(1-tp,aux.Stringid(33700920,3)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(1-tp,Card.IsAbleToDeck,tp,0,LOCATION_HAND,1,1,nil)
Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
end
end
function c33700920.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() and e:GetHandler():GetCounter(0x1b)>=30 end
Duel.SendtoGrave(e:GetHandler(),REASON_COST)
end
function c33700920.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
end
function c33700920.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetLabel()>0 end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(e:GetLabel()*500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()*500)
end
function c33700920.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c33700920.addop(e)
local c=e:GetHandler()
e:GetLabelObject():SetLabel(c:GetCounter(0x1b))
end
function c33700920.rtdop(e,tp)
local c=e:GetHandler()
local d1=Duel.TossDice(tp,1)
local d2=Duel.TossDice(1-tp,1)
if d1>d2 then
c:AddCounter(0x1b,d1)
else
c:RemoveCounter(tp,0x1b,math.min(c:GetCounter(0x1b),d1),REASON_EFFECT)
local ct=math.min(Duel.GetFieldGroupCount(tp,LOCATION_HAND,0),d1)
Duel.DiscardHand(tp,nil,ct,ct,REASON_EFFECT,nil)
end
end
\ No newline at end of file
--水晶魔法小妖精 布里吉特
function c33700921.initial_effect(c)
--ss
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33700921,0))
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_ATTACK)
e1:SetRange(LOCATION_HAND+LOCATION_REMOVED)
e1:SetCost(c33700921.cost)
e1:SetOperation(c33700921.operation)
c:RegisterEffect(e1)
--Revive
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700921,1))
e2:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_TODECK)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_REMOVED)
e2:SetCountLimit(1)
e2:SetCondition(function(e) return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<=0 end)
e2:SetTarget(c33700921.thtg)
e2:SetOperation(c33700921.thop)
c:RegisterEffect(e2)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_DECK)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetTargetRange(1,0)
e4:SetCondition(function(e) return e:GetHandler():IsFaceup() end)
e4:SetValue(0)
c:RegisterEffect(e4)
local e0=e4:Clone()
e0:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e0)
if c33700921.counter==nil then
c33700921.counter=true
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_RECOVER)
e3:SetOperation(c33700921.addcount)
Duel.RegisterEffect(e3,0)
end
end
function c33700921.addcount(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterFlagEffect(ep,33700921,RESET_PHASE+PHASE_END,0,1)
end
function c33700921.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:GetFlagEffect(33700921)>0
and c:IsAbleToDeck() and Duel.GetFlagEffect(tp,33700921)<=0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,c,1,0,0)
end
function c33700921.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SendtoDeck(c,tp,0,REASON_EFFECT)
if not c:IsLocation(LOCATION_DECK) then return end
c:ReverseInDeck()
end
function c33700921.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c33700921.operation(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetValue(0)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END)
e3:SetCondition(function(e,tp,eg,ep) return ep==tp end)
e3:SetOperation(c33700921.dop)
Duel.RegisterEffect(e3,tp)
e:GetHandler():RegisterFlagEffect(33700921,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,0)
end
function c33700921.dop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(33700921,0)) then
Duel.Recover(tp,ev,REASON_EFFECT)
else
Duel.ChangeBattleDamage(ep,0)
end
end
--此世全部之锅
function c33700922.initial_effect(c)
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_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c33700922.tglimit)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetValue(c33700922.atlimit)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(33700922,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_DAMAGE)
e4:SetCondition(c33700922.atkcon)
e4:SetOperation(c33700922.atkop)
c:RegisterEffect(e4)
end
function c33700922.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp
end
function c33700922.atkop(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(ev)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
end
function c33700922.atlimit(e,c)
return c~=e:GetHandler()
end
function c33700922.tglimit(e,c)
return c~=e:GetHandler()
end
--胜天半子
function c33700923.initial_effect(c)
end
--瞬时雨
function c33700924.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33700924.cost)
c:RegisterEffect(e1)
--act limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(c33700924.aclimit)
c:RegisterEffect(e2)
if not c33700924.global_check then
c33700924.global_check=true
c33700924.wtf={0}
local ge4=Effect.CreateEffect(c)
ge4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge4:SetCode(EVENT_CHAINING)
ge4:SetOperation(c33700924.checkop2)
Duel.RegisterEffect(ge4,0)
local ge5=ge4:Clone()
ge5:SetCode(EVENT_CHAIN_SOLVED)
ge5:SetOperation(c33700924.checkop3)
Duel.RegisterEffect(ge5,0)
local ge6=Effect.CreateEffect(c)
ge6:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
ge6:SetCode(EVENT_PHASE_START+PHASE_DRAW)
ge6:SetOperation(c33700924.reset)
Duel.RegisterEffect(ge6,0)
end
end
function c33700924.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
end
function c33700924.aclimit(e,re,tp)
return not re:GetHandler():IsImmuneToEffect(e) and re:GetHandler():IsCode(table.unpack(c33700924.wtf))
end
function c33700924.checkop3(e,tp,eg,ep,ev,re,r,rp)
for k,v in ipairs(c33700924.wtf) do
if v==re:GetHandler():GetCode() then
return end
end
c33700924.wtf[#c33700924.wtf+1]=re:GetHandler():GetCode()
end
function c33700924.checkop2(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) then
c33700924.wtf[#c33700924.wtf+1]=re:GetHandler():GetCode()
end
end
function c33700924.reset(e,tp,eg,ep,ev,re,r,rp)
c33700924.wtf={0}
end
\ No newline at end of file
--这宛如孤岛的崩坏世界
function c33700925.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e4:SetTarget(function(e,c) return c:GetDefense()<c:GetBaseDefense() end)
e4:SetValue(1)
c:RegisterEffect(e4)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(function(e,c) return c:GetAttack()<c:GetBaseAttack() end)
e2:SetValue(1)
c:RegisterEffect(e2)
--adjust
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_FZONE)
e3:SetOperation(c33700925.adjustop)
c:RegisterEffect(e3)
end
function c33700925.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(c33700925.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
Duel.Readjust()
end
end
function c33700925.cfilter(c)
return c:GetDefense()>c:GetBaseDefense() or c:GetAttack()>c:GetBaseAttack()
end
--鲸落
function c33700926.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c33700926.cost)
c:RegisterEffect(e1)
--tograve
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700926,0))
e2:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_FIELD)
e2:SetCategory(CATEGORY_DECKDES)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCondition(function(e,tp) return Duel.GetTurnPlayer()==tp end)
e2:SetTarget(c33700926.tgtg)
e2:SetOperation(c33700926.tgop)
c:RegisterEffect(e2)
e2:SetLabelObject(e1)
end
function c33700926.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ac=e:GetLabelObject():GetLabel()
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,ac)
end
function c33700926.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local p,val=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
if Duel.DiscardDeck(p,val,REASON_EFFECT)<=0 then return end
local g=Duel.GetOperatedGroup()
local fid=c:GetFieldID()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e1:SetLabel(fid)
e1:SetCondition(c33700926.spcon)
e1:SetOperation(c33700926.spop)
e1:SetReset(RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
Duel.RegisterEffect(e1,tp)
for tc in aux.Next(g) do
if tc:IsType(TYPE_MONSTER) then
tc:RegisterFlagEffect(33700926,RESETS_STANDARD+RESET_PHASE+PHASE_END+RESET_SELF_TURN,0,2,fid)
elseif tc:GetType()==TYPE_SPELL then
local ae=tc:GetActivateEffect()
if tc:GetLocation()==LOCATION_GRAVE and ae then
local e1=Effect.CreateEffect(tc)
e1:SetDescription(ae:GetDescription())
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e1:SetCountLimit(1,33700926)
e1:SetRange(LOCATION_GRAVE)
e1:SetReset(RESET_EVENT+0x2fe0000+RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
e1:SetCondition(c33700926.spellcon)
e1:SetTarget(c33700926.spelltg)
e1:SetOperation(c33700926.spellop)
tc:RegisterEffect(e1)
end
end
end
end
function c33700926.spellcon(e,tp,eg,ep,ev,re,r,rp,chk)
return e:GetHandler():GetTurnID()~=Duel.GetTurnCount()
end
function c33700926.spelltg(e,tp,eg,ep,ev,re,r,rp,chk)
local ae=e:GetHandler():GetActivateEffect()
local ftg=ae:GetTarget()
if chk==0 then
return not ftg or ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
if ae:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
else e:SetProperty(0) end
if ftg then
ftg(e,tp,eg,ep,ev,re,r,rp,chk)
end
end
function c33700926.spellop(e,tp,eg,ep,ev,re,r,rp)
local ae=e:GetHandler():GetActivateEffect()
local fop=ae:GetOperation()
fop(e,tp,eg,ep,ev,re,r,rp)
end
function c33700926.spfilter(c,e,tp)
return c:GetFlagEffectLabel(33700926)==e:GetLabel() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c33700926.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c33700926.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and tp==Duel.GetTurnPlayer()
end
function c33700926.spop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
Duel.Hint(HINT_CARD,0,33700926)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c33700926.spfilter,tp,LOCATION_GRAVE,0,1,ft,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
function c33700926.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
local lp=Duel.GetLP(tp)
local m=math.floor(math.min(lp,3000)/1000)
local t={}
for i=1,m do
t[i]=i*1000
end
local ac=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.PayLPCost(tp,ac)
e:SetLabel(ac/1000)
end
\ No newline at end of file
--Last Shooting
function c33700927.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetHintTiming(TIMING_BATTLE_END)
e1:SetCondition(c33700927.condition)
e1:SetTarget(c33700927.target)
e1:SetOperation(c33700927.activate)
c:RegisterEffect(e1)
if c33700927.counter==nil then
c33700927.counter=true
c33700927[0]=0
c33700927[1]=0
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetCode(EVENT_PHASE_START+PHASE_DRAW)
e2:SetOperation(c33700927.resetcount)
Duel.RegisterEffect(e2,0)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e3:SetCode(EVENT_BATTLE_DAMAGE)
e3:SetOperation(c33700927.addcount)
Duel.RegisterEffect(e3,0)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e4:SetCode(EVENT_ATTACK_ANNOUNCE)
e4:SetOperation(c33700927.addcount2)
Duel.RegisterEffect(e4,0)
end
end
function c33700927.resetcount(e,tp,eg,ep,ev,re,r,rp)
c33700927[0]=0
c33700927[1]=0
end
function c33700927.addcount(e,tp,eg,ep,ev,re,r,rp)
c33700927[rp]=c33700927[rp]+ev
end
function c33700927.addcount2(e,tp,eg,ep,ev,re,r,rp)
local ac=eg:GetFirst()
if ac:IsRace(RACE_MACHINE) then
Duel.RegisterFlagEffect(ac:GetControler(),33700927,RESET_PHASE+PHASE_END,0,1)
end
end
function c33700927.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_BATTLE and Duel.GetTurnPlayer()==tp and c33700927[tp]>=4000 and Duel.GetLP(1-tp)<=1000
end
function c33700927.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(2100)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,2100)
if Duel.GetFlagEffect(tp,33700927)>0 then
Duel.SetChainLimit(aux.FALSE)
end
end
function c33700927.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--摒息射击
function c33700928.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c33700928.condition)
e1:SetTarget(c33700928.target)
e1:SetOperation(c33700928.activate)
c:RegisterEffect(e1)
end
function c33700928.cfilter(c,tp)
return c:IsLocation(LOCATION_ONFIELD) and c:IsControler(tp)
end
function c33700928.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsExists(c33700928.cfilter,1,nil,tp) and Duel.IsChainDisablable(ev)
end
function c33700928.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c33700928.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)~=0 and c:IsRelateToEffect(e) and c:IsCanTurnSet() and Duel.CheckLPCost(tp,1500) and Duel.SelectYesNo(tp,aux.Stringid(33700928,0)) then
Duel.PayLPCost(tp,1500)
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
--豪赌一发?!
function c33700929.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33700929.acttg)
e1:SetOperation(c33700929.actop)
c:RegisterEffect(e1)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700929,0))
e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetCountLimit(1)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(c33700929.discon)
e3:SetTarget(c33700929.distg)
e3:SetOperation(c33700929.disop)
c:RegisterEffect(e3)
e3:SetLabelObject(e1)
--td
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33700929,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetCondition(c33700929.atkcon)
e2:SetTarget(c33700929.atktg)
e2:SetOperation(c33700929.atkop)
c:RegisterEffect(e2)
--
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EFFECT_INDESTRUCTABLE_COUNT)
e4:SetCountLimit(1)
e4:SetValue(c33700929.valcon)
c:RegisterEffect(e4)
end
function c33700929.atkcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and e:GetLabelObject():GetLabel()<=6
end
function c33700929.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsAbleToHand() end
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c33700929.atkop(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 not tc:IsStatus(STATUS_ATTACK_CANCELED) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function c33700929.discon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsChainNegatable(ev) and rp~=tp and e:GetLabelObject():GetLabel()==15
end
function c33700929.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function c33700929.disop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.NegateActivation(ev)
end
function c33700929.valcon(e,re,r,rp)
return bit.band(r,REASON_EFFECT)~=0
end
function c33700929.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=15 end
end
function c33700929.actop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) or Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return end
Duel.ConfirmDecktop(tp,15)
local g=Duel.GetDecktopGroup(tp,15)
local ct=g:GetClassCount(Card.GetCode)
e:SetLabel(ct)
if ct>6 and ct<15 and Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0 then
Duel.MoveToField(c,tp,1-tp,LOCATION_SZONE,POS_FACEUP,true)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetTargetRange(1,0)
e1:SetCondition(c33700929.con)
e1:SetValue(0)
tc:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2,true)
end
end
function c33700929.con(e)
return e:GetHandlerPlayer()==e:GetOwnerPlayer()
end
\ No newline at end of file
--坠天的希望
function c33700930.initial_effect(c)
--activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1)
e3:SetCondition(function(e,tp) return Duel.GetTurnPlayer()==tp end)
e3:SetOperation(c33700930.aop)
c:RegisterEffect(e3)
end
function c33700930.aop(e,tp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local ct=Duel.GetMatchingGroupCount(c33700930.cfilter,tp,LOCATION_ONFIELD,0,nil)
if ct>=3 then Duel.SendtoGrave(c,REASON_EFFECT) end
if ct<=2 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
end
if ct<=1 then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetTargetRange(LOCATION_ONFIELD,0)
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN)
e2:SetValue(1)
Duel.RegisterEffect(e2,tp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(0)
e1:SetOwnerPlayer(tp)
e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(function(e) return Duel.GetFieldGroupCount(e:GetOwnerPlayer(),LOCATION_HAND,0)<Duel.GetFieldGroupCount(1-e:GetOwnerPlayer(),LOCATION_HAND,0) and Duel.GetTurnCount()~=e:GetLabel() end)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
local e3=e1:Clone()
e3:SetCode(EFFECT_NO_EFFECT_DAMAGE)
e3:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e3,tp)
end
if ct==0 then
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+RESET_SELF_TURN)
e1:SetValue(2)
Duel.RegisterEffect(e1,tp)
end
end
function c33700930.cfilter(c)
return c:IsFacedown() or not c:IsCode(33700930)
end
\ No newline at end of file
--结缘
function c33700931.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_SPECIAL_SUMMON+CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)==Duel.GetFieldGroupCount(tp,0,LOCATION_HAND) end)
e1:SetTarget(c33700931.target)
e1:SetOperation(c33700931.activate)
c:RegisterEffect(e1)
end
function c33700931.target(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2)
local b2=true
local b3=Duel.IsExistingMatchingCard(c33700931.atfilter,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c33700931.atfilter,1-tp,0,LOCATION_MZONE,1,nil,1-tp)
if chk==0 then return b1 or b2 or b3 end
end
function c33700931.atfilter(c,tp)
return c:IsFaceup() and c:IsDefenseAbove(0) and Duel.IsExistingMatchingCard(c33700931.atfilter2,tp,LOCATION_MZONE,0,1,nil,c:GetAttack(),c:GetDefense())
end
function c33700931.atfilter2(c,atk,def)
return c:IsFaceup() and (c:GetAttack()~=atk or c:GetDefense()~=def)
end
function c33700931.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local player={tp,1-tp}
local tf1,tf2,tf3=true,true,true
for i=1,2 do
local p=player[i]
local b1=Duel.IsPlayerCanDraw(tp,2) and Duel.IsPlayerCanDraw(1-tp,2) and tf1
local b2=tf2
local b3=Duel.IsExistingMatchingCard(c33700931.atfilter,tp,0,LOCATION_MZONE,1,nil,tp) and Duel.IsExistingMatchingCard(c33700931.atfilter,1-tp,0,LOCATION_MZONE,1,nil,1-tp) and tf3
local off=1
local ops={}
local opval={}
if b1 then
ops[off]=aux.Stringid(33700931,0)
opval[off-1]=1
off=off+1
end
if b2 then
ops[off]=aux.Stringid(33700931,1)
opval[off-1]=2
off=off+1
end
if b3 then
ops[off]=aux.Stringid(33700931,2)
opval[off-1]=3
off=off+1
end
local op=Duel.SelectOption(p,table.unpack(ops))
local sel=opval[op]
Duel.Hint(HINT_OPSELECTED,1-p,aux.Stringid(33700931,sel-1))
if sel==1 then
Duel.Draw(p,2,REASON_EFFECT)
local g1=Duel.GetOperatedGroup()
Duel.Draw(1-p,2,REASON_EFFECT)
local g2=Duel.GetOperatedGroup()
g1:Merge(g2)
local fid=c:GetFieldID()
for tc in aux.Next(g1) do
tc:RegisterFlagEffect(33700931,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
g1:KeepAlive()
e2:SetLabelObject(g1)
e2:SetLabel(fid)
e2:SetCondition(c33700931.tgcon)
e2:SetOperation(c33700931.tgop)
Duel.RegisterEffect(e2,tp)
tf1=false
elseif sel==2 then
for i=1,2 do
local p2=player[i]
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(Card.IsCanBeSpecialSummoned),p2,LOCATION_HAND+LOCATION_GRAVE,0,nil,e,0,p2,false,false)
if Duel.GetLocationCount(p2,LOCATION_MZONE)>0 and #g>0 and Duel.SelectYesNo(tp,aux.Stringid(33700931,3)) then
Duel.Hint(HINT_SELECTMSG,p2,HINTMSG_SPSUMMON)
local sg=g:Select(p2,1,1,nil)
Duel.SpecialSummon(sg,0,p2,p2,false,false,POS_FACEUP)
end
end
tf2=false
elseif sel==3 then
for i=1,2 do
local p2=player[i]
Duel.Hint(HINT_SELECTMSG,p2,HINTMSG_OPPO)
local a1=Duel.SelectMatchingCard(p2,c33700931.atfilter,p2,0,LOCATION_MZONE,1,1,nil,p2)
Duel.HintSelection(a1)
local ac=a1:GetFirst()
local atk,def=ac:GetAttack(),ac:GetDefense()
local ag=Duel.GetMatchingGroup(c33700931.atfilter2,p2,LOCATION_MZONE,0,nil,atk,def)
for tc in aux.Next(ag) do
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(atk)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE_FINAL)
e2:SetValue(def)
tc:RegisterEffect(e2)
end
end
tf3=false
end
end
end
function c33700931.tdcfilter(c,fid)
return c:GetFlagEffectLabel(33700931)==fid
end
function c33700931.tgcon(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject()
local tg=g:Filter(c33700931.tdcfilter,nil,e:GetLabel())
if #tg>0 then return true
else
g:DeleteGroup()
e:Reset()
return false
end
end
function c33700931.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,10174020)
local g=e:GetLabelObject()
local tg=g:Filter(c33700931.tdcfilter,nil,e:GetLabel())
Duel.SendtoGrave(tg,REASON_EFFECT)
end
\ No newline at end of file
--弱者的温存
function c33700932.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c33700932.target)
e1:SetOperation(c33700932.activate)
c:RegisterEffect(e1)
--disable spsummon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTarget(function(e,c) return c:GetBaseAttack()>=1200 end)
e2:SetTargetRange(1,0)
c:RegisterEffect(e2)
--adjust
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EVENT_ADJUST)
e3:SetRange(LOCATION_SZONE)
e3:SetOperation(c33700932.adjustop)
c:RegisterEffect(e3)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetRange(LOCATION_SZONE)
e5:SetCode(EFFECT_CANNOT_SUMMON)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e5:SetTargetRange(1,0)
e5:SetTarget(function(e,c) return c:GetBaseAttack()>=1200 end)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetRange(LOCATION_SZONE)
e6:SetCode(EFFECT_CANNOT_FLIP_SUMMON)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,0)
e6:SetTarget(function(e,c) return c:GetBaseAttack()<=1200 end)
c:RegisterEffect(e6)
--indes
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e11:SetRange(LOCATION_MZONE)
e11:SetTargetRange(LOCATION_MZONE,0)
e6:SetTarget(function(e,c) return c:GetBaseAttack()<=1200 and c:IsFaceup() end)
e11:SetValue(1)
c:RegisterEffect(e11)
local e22=e1:Clone()
e22:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e22)
--damage
local e41=Effect.CreateEffect(c)
e41:SetType(EFFECT_TYPE_FIELD)
e41:SetCode(EFFECT_CHANGE_DAMAGE)
e41:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e41:SetRange(LOCATION_SZONE)
e41:SetTargetRange(1,1)
e41:SetValue(c33700932.damval)
c:RegisterEffect(e41)
end
function c33700932.damval(e,re,val,r,rp,rc)
return math.min(val,1200)
end
function c33700932.adjustop(e,tp,eg,ep,ev,re,r,rp)
local phase=Duel.GetCurrentPhase()
if (phase==PHASE_DAMAGE and not Duel.IsDamageCalculated()) or phase==PHASE_DAMAGE_CAL then return end
local g=Duel.GetMatchingGroup(c33700932.filter2,tp,LOCATION_MZONE,0,nil)
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_RULE)
Duel.Readjust()
end
end
function c33700932.filter(c)
return c:IsFaceup() and c:GetBaseAttack()>=1200 and c:IsAbleToGrave()
end
function c33700932.filter2(c)
return c:IsFaceup() and c:GetBaseAttack()>=1200
end
function c33700932.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c33700932.filter,tp,LOCATION_MZONE,0,1,nil) end
local g=Duel.GetMatchingGroup(c33700932.filter,tp,LOCATION_MZONE,0,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,#g,tp,LOCATION_MZONE)
end
function c33700932.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c33700932.filter,tp,LOCATION_MZONE,0,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
end
\ No newline at end of file
--炙热星光焚天爆
function c33700933.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE+CATEGORY_DESTROY+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(function(e,tp) return Duel.GetLP(tp)>10000 end)
e1:SetTarget(c33700933.target)
e1:SetOperation(c33700933.activate)
e1:SetValue(33700933)
c:RegisterEffect(e1)
if not c33700933.global_check then
c33700933.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_CHAIN_NEGATED)
ge1:SetOperation(c33700933.checkop)
Duel.RegisterEffect(ge1,0)
local ge2=ge1:Clone()
ge2:SetCode(EVENT_CHAIN_DISABLED)
Duel.RegisterEffect(ge2,0)
end
end
function c33700933.checkop(e,tp,eg,ep,ev,re,r,rp)
local dp,e2,p2=Duel.GetChainInfo(ev,CHAININFO_DISABLE_PLAYER,CHAININFO_TRIGGERING_EFFECT,CHAININFO_TRIGGERING_PLAYER)
if e2:GetValue() and e2:GetValue()==33700933 and dp~=p2 and Duel.GetLP(dp)>1 then
Duel.Hint(HINT_CARD,0,33700933)
Duel.SetLP(dp,1)
end
end
function c33700933.target(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)-1
local b1=lp<9999
local b2=lp>=9999 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=lp>=15000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
local b4=lp>=20000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_EXTRA,LOCATION_EXTRA,1,nil)
local b5=lp>=25000 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local b6=lp>=30000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil)
if chk==0 then return b1 or b2 or b3 or b4 or b5 or b6 end
if b1 then
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,lp)
end
if b2 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
if b3 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,LOCATION_HAND,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
if b4 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
end
if b5 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,0,0)
end
if b6 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,#g,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,#g*1000)
end
end
function c33700933.activate(e,tp,eg,ep,ev,re,r,rp,chk)
local lp=Duel.GetLP(tp)-1
if lp<=0 then return end
Duel.SetLP(tp,lp)
local b1=lp<9999
local b2=lp>=9999 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
local b3=lp>=15000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,LOCATION_HAND,1,nil)
local b4=lp>=20000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_EXTRA,LOCATION_EXTRA,1,nil)
local b5=lp>=25000 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil)
local b6=lp>=30000 and Duel.IsExistingMatchingCard(nil,tp,LOCATION_DECK,0,1,nil)
if b1 then
Duel.Recover(1-tp,lp,REASON_EFFECT)
end
if b2 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
if b3 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_HAND,LOCATION_HAND,nil)
Duel.Destroy(g,REASON_EFFECT)
end
if b4 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_EXTRA,LOCATION_EXTRA,nil)
Duel.Destroy(g,REASON_EFFECT)
end
if b5 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,LOCATION_GRAVE,LOCATION_GRAVE,nil)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
if b6 then
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_DECK,0,nil)
local ct=Duel.Destroy(g,REASON_EFFECT)
if ct>0 then
Duel.Damage(1-tp,ct*1000,REASON_EFFECT)
end
end
end
\ No newline at end of file
--齿械公主的空虚啸
function c33700934.initial_effect(c)
--sdasd
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c33700934.cost)
e1:SetTarget(c33700934.target)
e1:SetOperation(c33700934.operation)
c:RegisterEffect(e1)
end
function c33700934.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c33700934.cfilter(c,tp)
return c:IsFaceup() and Duel.IsExistingMatchingCard(c33700934.cfiltr2,tp,LOCATION_DECK,0,1,c,tp,c)
end
function c33700934.cfilter2(c,tp,rc)
local g=Group.FromCards(c,rc)
return c:IsAbleToGrave() and c:IsCode(rc:GetCode()) and Duel.IsExistingMatchingCard(c33700934.cfiltr3,tp,LOCATION_DECK,0,1,g,c:GetCode()) and c:IsType(TYPE_MONSTER)
end
function c33700934.cfilter3(c,code)
return c:IsCode(code) and c:IsAbleToRemove() and c:IsType(TYPE_MONSTER)
end
function c33700934.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if e:GetLabel()~=1 then e:SetLabel(0) return false end
e:SetLabel(0)
return Duel.CheckReleaseGroup(tp,c33700934.cfilter,1,nil,tp)
end
e:SetLabel(0)
local g=Duel.SelectReleaseGroup(tp,c33700934.cfilter,1,1,nil,tp)
Duel.Release(g,REASON_COST)
e:SetLabelObject(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_REMOVED)
end
function c33700934.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=Duel.SelectMatchingCard(tp,c33700934.cfiltr2,tp,LOCATION_DECK,0,1,nil,tp,tc)
if #tg<=0 or Duel.SendtoGrave(tg,REASON_EFFECT)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local tc2=Duel.SelectMatchingCard(tp,c33700934.cfiltr3,tp,LOCATION_DECK,0,1,nil,tc:GetCode()):GetFirst()
if not tc2 or Duel.Remove(tc2,POS_FACEUP,REASON_EFFECT)<=0 then return end
local fid=tc2:GetFieldID()
local ct=1
if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<=PHASE_STANDBY then ct=2 end
tc2:RegisterFlagEffect(33700934,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,0,ct,fid)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,ct)
e2:SetCountLimit(1)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetLabelObject(tc2)
e2:SetValue(fid)
e2:SetLabel(Duel.GetTurnCount())
e2:SetCondition(c33700934.thcon)
e2:SetOperation(c33700934.thop)
Duel.RegisterEffect(e2,tp)
end
function c33700934.thcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if tc:GetFlagEffectLabel(33700934)~=e:GetValue() or Duel.GetTurnPlayer()~=tp or Duel.GetTurnCount()==e:GetLabel() then
e:Reset()
return false
else
return true
end
end
function c33700934.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
Duel.Hint(HINT_CARD,0,33700934)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
\ No newline at end of file
--三连心械姬 三星
function c33700935.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,c33700935.lfilter,3)
--spsummon condition
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.lnklimit)
c:RegisterEffect(e0)
--battle indestructable
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e) return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE end)
e1:SetValue(c33700935.efilter)
c:RegisterEffect(e1)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(33700935,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCondition(c33700935.spcon)
e3:SetTarget(c33700935.sptg)
e3:SetOperation(c33700935.spop)
c:RegisterEffect(e3)
--attack all
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_ATTACK_ALL)
e4:SetValue(c33700935.atkfilter)
c:RegisterEffect(e4)
end
function c33700935.atkfilter(e,c)
return e:GetHandler():GetLinkedGroup():IsContains(c)
end
function c33700935.spfilter(c,e,tp,zone)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp,zone) and c:IsSetCard(0x1449)
end
function c33700935.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local zone=e:GetHandler():GetLinkedZone(1-tp)
if chk==0 then return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0
and Duel.IsExistingMatchingCard(c33700935.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end
function c33700935.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local bool=false
for i=1,3 do
local zone=c:GetLinkedZone(1-tp)
if Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)<=0 then break end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c33700935.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp,zone)
if #g<=0 then break end
if i>1 and not Duel.SelectYesNo(tp,aux.Stringid(33700935,1)) then break end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=g:Select(tp,1,1,nil):GetFirst()
if not tc then break end
Duel.SpecialSummonStep(tc,0,tp,1-tp,false,false,POS_FACEUP,zone)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
bool=true
end
if bool then
Duel.SpecialSummonComplete()
end
end
function c33700935.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c33700935.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c33700935.lfilter(c)
return c:IsLinkSetCard(0x3449) or c:IsLinkSetCard(0x1449)
end
\ No newline at end of file
--猫头鹰侦探二人组
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700936
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.SV_CHANGE(c,"code",33700069)
e1:SetRange(LOCATION_MZONE+LOCATION_GRAVE)
local f=function(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)>=15
end
local e2=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,f)
local f2=function(e)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
local e3=rsef.I(c,{m,0},nil,"se,th,tg",nil,LOCATION_HAND,f2,nil,cm.tg,cm.op)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return false end
local g=Duel.GetDecktopGroup(tp,15)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=aux.ExceptThisCard(e)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
local t={}
local f=math.floor(#g/15)
local l=1
while l<=f do
t[l]=l*15
l=l+1
end
local act=Duel.AnnounceNumber(tp,table.unpack(t))
Duel.ConfirmDecktop(tp,act)
local rg=Duel.GetDecktopGroup(tp,act)
local codect=rg:GetClassCount(Card.IsCode)
if codect<act then
if c then Duel.SendtoGrave(c,REASON_EFFECT)
Duel.ShuffleDeck(tp)
return end
end
if rg:FilterCount(Card.IsAbleToHand,nil)<=0 or not Duel.SelectYesNo(tp,aux.Stringid(m,1)) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=rg:FilterSelect(tp,Card.IsAbleToHand,1,l-1,nil)
if #tg>0 then
Duel.SendtoHand(tg,nil,2,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
Duel.ShuffleDeck(tp)
end
end
\ No newline at end of file
--动物朋友 地狱三头犬
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700937
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,aux.FilterBoolFunction(Card.IsLevel,5),cm.xyzcheck,3,3,cm.ovfilter,aux.Stringid(m,2))
local f=function(e)
return Duel.IsAbleToEnterBP()
end
local e1=rsef.I(c,{m,0},1,nil,nil,LOCATION_MZONE,f,rscost.rmxyzs(true),nil,cm.op)
local e2=rsef.STO(c,EVENT_BATTLE_DESTROYING,{m,1},nil,nil,"de",cm.xyzcon,nil,cm.xyztg,cm.xyzop)
end
function cm.xyzcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=c:GetBattleTarget()
if not c:IsRelateToBattle() or c:IsFacedown() then return false end
e:SetLabelObject(tc)
return tc:IsType(TYPE_MONSTER) and tc:IsReason(REASON_BATTLE)
end
function cm.xyztg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tc,1,0,0)
end
function cm.xyzop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and c:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.Overlay(c,tc)
end
end
function cm.ovfilter(c)
return c:IsFaceup() and not c:IsCode(m)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetCode)==3
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local c=aux.ExceptThisCard(e)
if c then
local e1=rsef.SV(c,EFFECT_EXTRA_ATTACK,e:GetLabel())
e1:SetReset(rsreset.est_pend)
end
end
--动物朋友 杰克灯鬼火
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700938
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure2(c,nil,aux.NonTuner(nil))
local e1=rsef.I(c,{m,0},{1,m},"tg,rec",nil,LOCATION_MZONE,nil,nil,cm.tg,cm.op)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<10 then return false end
local g=Duel.GetDecktopGroup(tp,10)
return g:FilterCount(Card.IsAbleToGrave,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local rg=Duel.GetDecktopGroup(tp,10)
Duel.ConfirmDecktop(tp,10)
local codect=rg:GetClassCount(Card.GetCode)
if #rg>0 and codect==#rg and rg:FilterCount(Card.IsAbleToGrave,nil)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=rg:FilterSelect(tp,Card.IsAbleToGrave,1,5,nil)
if #tg>0 then
local rct=Duel.SendtoGrave(tg,REASON_EFFECT)
Duel.Recover(tp,rct*800,REASON_EFFECT)
end
end
Duel.ShuffleDeck(tp)
Duel.BreakEffect()
local e1=rsef.FV({c,tp},EFFECT_REVERSE_DECK,nil,nil,{1,0},nil,nil,{rsreset.pend+RESET_SELF_TURN,2},"ptg")
local e2=rsef.FV({c,tp},EFFECT_CHANGE_DAMAGE,0,nil,{1,0},nil,nil,{rsreset.pend+RESET_SELF_TURN,2},"ptg")
local e3=rsef.FV({c,tp},EFFECT_NO_EFFECT_DAMAGE,0,nil,{1,0},nil,nil,{rsreset.pend+RESET_SELF_TURN,2},"ptg")
end
--小包 ~踏上新的未知旅程~
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700939
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op)
local e2=rsef.I(c,{m,0},{1,m},"tg,th,se",nil,LOCATION_MZONE,nil,nil,cm.tg2,cm.op2)
end
function cm.con(e,c)
if not c then return true end
local tp=c:GetControler()
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsType(TYPE_MONSTER)
end
local f2=function(rc,p)
return Duel.GetLocationCountFromEx(p,p,rc)>0 and rc:IsSetCard(0x442)
end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=5 and Duel.CheckReleaseGroup(tp,f2,1,nil,tp)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
local f=function(rc,p)
return Duel.GetLocationCountFromEx(p,p,rc)>0 and rc:IsSetCard(0x442)
end
local g=Duel.SelectReleaseGroup(tp,f,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.ffilter(c,fc,sub,mg,sg)
return not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return false end
local g=Duel.GetDecktopGroup(tp,15)
return g:FilterCount(Card.IsAbleToHand,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=aux.ExceptThisCard(e)
local rg=Duel.GetDecktopGroup(tp,15)
Duel.ConfirmDecktop(tp,15)
local codect=rg:GetClassCount(Card.GetCode)
if #rg<=0 then return end
if codect<#rg and c then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
local g1=rg:Filter(Card.IsAbleToHand,nil)
local g2=g1:Filter(Card.IsSetCard,nil,0x442)
if #g1<=0 and #g2<=0 then return end
local op=rsof.SelectOption(tp,true,aux.Stringid(m,1),#g1>0,aux.Stringid(m,2),#g2>0,aux.Stringid(m,3))
local g=nil
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
if op==2 then
g=g1:Select(tp,1,1,nil)
elseif op==3 then
g=g2:Select(tp,1,3,nil)
end
if g then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
g1:Sub(g)
local g3=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_GRAVE,0,nil,0x442)
if g3:GetClassCount(Card.GetCode)>=15 and #g1>0 and Duel.SelectYesNo(tp,aux.Stringid(m,4)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g4=g1:Select(tp,1,1,nil)
Duel.BreakEffect()
Duel.SendtoHand(g4,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g4)
end
end
end
--薮猫 ~踏上新的未知旅程~
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700940
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,cm.ffilter,2,true)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_EXTRA,cm.con,cm.op)
local f1=function(tp,re,rp)
return tp~=rp
end
local e2=rsef.QO(c,EVENT_CHAINING,{m,0},1,"tg,des,neg","dsp,dcal",LOCATION_MZONE,rscon.negcon(f1),nil,cm.tg2,cm.op2)
local f2=function(e)
local g=Duel.GetMatchingGroup(Card.IsSetCard,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,0x442)
return g:GetClassCount(Card.GetCode)>=15
end
local e3=rsef.FV_INDESTRUCTABLE(c,"battle")
e3:SetCondition(f2)
local e4=rsef.FV(c,EFFECT_AVOID_BATTLE_DAMAGE,1,nil,{1,0},LOCATION_MZONE,f2,nil,"ptg")
end
function cm.con(e,c)
if not c then return true end
local tp=c:GetControler()
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsType(TYPE_MONSTER)
end
local f2=function(rc,p)
return Duel.GetLocationCountFromEx(p,p,rc)>0 and rc:IsSetCard(0x442)
end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=5 and Duel.CheckReleaseGroup(tp,f2,1,nil,tp)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp,c)
local f=function(rc,p)
return Duel.GetLocationCountFromEx(p,p,rc)>0 and rc:IsSetCard(0x442)
end
local g=Duel.SelectReleaseGroup(tp,f,1,1,nil,tp)
Duel.Release(g,REASON_COST)
end
function cm.ffilter(c,fc,sub,mg,sg)
return not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode())
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<15 then return false end
local g=Duel.GetDecktopGroup(tp,15)
return g:FilterCount(Card.IsAbleToGrave,nil)>0
end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,0,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp,chk)
local rg=Duel.GetDecktopGroup(tp,15)
Duel.ConfirmDecktop(tp,15)
local codect=rg:GetClassCount(Card.GetCode)
if #rg<=0 or codect<#rg then return end
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsAbleToGrave()
end
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and rg:IsExists(f,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tg=rg:FilterSelect(tp,f,1,1,nil)
if Duel.SendtoGrave(tg,REASON_EFFECT)~=0 then
Duel.Destroy(eg,REASON_EFFECT)
end
end
end
\ No newline at end of file
--动物朋友 北狐 ~雪~
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700941
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
local e1=rsef.SV_LIMIT(c,"ress")
local e2=rsef.SV_LIMIT(c,"resns")
local e3=rsef.STO(c,EVENT_SPSUMMON_SUCCESS,{m,0},1)
e3:SetOperation(function(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_DECK,0)
if #g>0 then Duel.ConfirmCards(1-tp,g) end
if g:GetClassCount(Card.GetCode)<#g then return end
local rc=rscf.GetRelationCard(e)
if rc then
e:GetLabelObject():SetLabel(1)
end
end)
local f1=function(tp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)==#g
end
local e4=rsef.QO(c,EVENT_CHAINING,{m,0},1,"rm,neg","dsp,dcal",LOCATION_MZONE,rscon.negcon(f1),nil,cm.tg,cm.op)
e3:SetLabelObject(e4)
local f2=function(e)
return Duel.GetCurrentChain()==0
end
local e4=rsef.QO(c,EVENT_SPSUMMON,{m,0},1,"rm,diss",nil,LOCATION_MZONE,f2,nil,cm.tg2,cm.op2)
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,eg:GetCount(),0,0)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return re:GetHandler():IsAbleToRemove() and e:GetLabel()==1 end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
if re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,eg,1,0,0)
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
--动物朋友 北极海鹦
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700942
local cm=_G["c"..m]
function cm.initial_effect(c)
--summon with s/t
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetTargetRange(LOCATION_ONFIELD,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_SPELL+TYPE_TRAP))
e1:SetValue(POS_FACEUP_ATTACK)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_HAND)
e2:SetCost(cm.cost)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
--tribute check
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(cm.valcheck)
c:RegisterEffect(e3)
--adop
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(m,1))
e4:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCondition(rscon.sumtype("adv"))
e4:SetCost(cm.cost2)
e4:SetOperation(cm.operation2)
c:RegisterEffect(e4)
e4:SetLabelObject(e3)
end
function cm.costfilter(c,typ)
if not c:IsReleasable() then return false end
local typelist={ TYPE_SPELL,TYPE_TRAP,TYPE_MONSTER }
for _,typ2 in ipairs(typelist) do
if typ&typ2~=0 then return true end
end
return false
end
function cm.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
local typ=e:GetLabelObject():GetLabel()
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,0,LOCATION_ONFIELD,1,nil,typ) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,0,LOCATION_ONFIELD,1,1,nil,typ)
Duel.Release(g,REASON_COST)
end
function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local c2=aux.ExceptThisCard(e)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,c2)
if c2 and c2:IsFaceup() then
local e1=rsef.SV_UPDATE(c2,"atk,def",1000,nil,rsreset.est_d)
end
for tc in aux.Next(g) do
local e1=rsef.SV_UPDATE({c,tc},"atk,def",500,nil,rsreset.est)
end
end
function cm.valcheck(e,c)
local g=c:GetMaterial()
local typ=0
local tc=g:GetFirst()
while tc do
typ=bit.bor(typ,bit.band(tc:GetOriginalType(),0x7))
tc=g:GetNext()
end
e:SetLabel(typ)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function cm.filter(c)
return c:IsSetCard(0x442) and c:IsType(TYPE_MONSTER) and not c:IsCode(m) and c:IsAbleToHand()
end
function cm.target(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.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
local tc=g:GetFirst()
if tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(cm.aclimit)
e1:SetLabelObject(tc)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
function cm.aclimit(e,re,tp)
local tc=e:GetLabelObject()
return re:GetHandler():IsCode(tc:GetCode()) and not re:GetHandler():IsImmuneToEffect(e)
end
\ No newline at end of file
--动物朋友之楔 天蓝薮猫
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700943
local cm=_G["c"..m]
function cm.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkSetCard,0x442),3,3,cm.lcheck)
c:EnableReviveLimit()
local e1=rsef.SV_INDESTRUCTABLE(c,"battle")
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(cm.condition)
e2:SetTarget(cm.target)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
end
function cm.filter(c,e,tp,zone)
return c:IsSetCard(0x442) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local zone=e:GetHandler():GetLinkedZone(tp)
return zone~=0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp,zone)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local zone=e:GetHandler():GetLinkedZone(tp)
if zone==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.filter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,zone)
if #g>0 then
rssf.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP,zone,rssf.SummonBuff(nil,nil,nil,LOCATION_HAND))
end
end
function cm.condition(e,tp)
local g=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)==#g
end
function cm.lcheck(g,lc)
return g:GetClassCount(Card.GetCode)==#g and g:IsExists(Card.IsType,1,nil,TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK)
end
\ No newline at end of file
--动物朋友 丛林鸦
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700944
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableCounterPermit(0x5)
local e1=rscf.SetSpecialSummonProduce(c,LOCATION_HAND,cm.sprcon)
local e2=rsef.I(c,{m,0},1,"rm,ct","tg",LOCATION_MZONE,nil,nil,cm.tg,cm.op)
--leave
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetCode(EVENT_LEAVE_FIELD_P)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e4:SetOperation(cm.leaveop)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e5:SetCode(EVENT_LEAVE_FIELD)
e5:SetOperation(cm.leaveop2)
c:RegisterEffect(e5)
e5:SetLabelObject(e4)
end
function cm.leaveop(e)
local c=e:GetHandler()
e:SetLabel(c:GetCounter(0x5))
end
function cm.leaveop2(e,tp)
local ct=e:GetLabelObject():GetLabel()
if ct>0 then
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,ct*800,REASON_EFFECT)
end
end
function cm.sprcon(e,c)
if not c then return true end
local tp=c:GetControler()
local g2=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
local g1=Duel.GetFieldGroup(tp,LOCATION_GRAVE,0)
return (#g1==0 or g1:GetClassCount(Card.GetCode)==#g1) and #g2>1 and g2:GetClassCount(Card.GetCode)==#g2
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
local f=function(c,p)
return Duel.IsExistingMatchingCard(Card.IsCode,p,0,LOCATION_GRAVE,1,c,c:GetCode())
end
if chkc then return f(chkc,tp) and chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(f,tp,0,LOCATION_GRAVE,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectTarget(tp,f,tp,0,LOCATION_GRAVE,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,#g,1-tp,0)
end
function cm.op(e,tp)
local tc=rscf.GetTargetCard()
if not tc then return end
local g1=Duel.GetFieldGroup(tp,0,LOCATION_GRAVE)
local g2=Duel.GetDecktopGroup(1-tp,5)
if #g2>0 then
Duel.ConfirmDecktop(1-tp,5)
g1:Merge(g2)
end
local rg=g1:Filter(Card.IsCode,nil,tc:GetCode())
local ct=Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
local c=rscf.GetRelationCard()
if c and ct>0 then
c:AddCounter(0x5,ct)
end
end
--砂之星之降诞
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700945
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"th,tg",nil,nil,nil,cm.tg,cm.op)
local f=function(rc,e,tp)
return rc:GetTurnID()==Duel.GetTurnCount() and rc:IsReason(REASON_BATTLE+REASON_EFFECT) and rc:IsReason(REASON_DESTROY) and rc:GetReasonPlayer()~=tp and rc:IsType(TYPE_MONSTER) and rc:IsSetCard(0x442)
end
local e2=rsef.QO(c,nil,{m,3},nil,"th","tg",LOCATION_GRAVE,nil,aux.bfgcost,rstg.target(f,"th",LOCATION_GRAVE,0,1,1),cm.op2)
end
function cm.op2(e)
local g=rsgf.GetTargetGroup()
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetDecktopGroup(tp,7)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function cm.filter(c)
return (c:IsSetCard(0x104) and c:IsType(TYPE_MONSTER)) or c:IsSetCard(0xfe)
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmDecktop(tp,7)
local g=Duel.GetDecktopGroup(tp,7)
if #g<=0 then return end
if g:GetClassCount(Card.GetCode)<#g then Duel.ShuffleDeck(tp) return end
local f=function(c,ctype)
return c:IsAbleToHand() and c:IsSetCard(0x442) and (not ctype or c:IsType(ctype))
end
local b1=g:IsExists(f,1,nil)
local b2=g:FilterCount(f,nil,TYPE_MONSTER)==#g and #g>=3
local b3=b2 and Duel.IsPlayerCanDiscardDeck(tp,#g) and #g>=4
if not b1 and not b2 and not b3 then return end
local op=rsof.SelectOption(tp,b1,{m,0},b2,{m,1},b3,{m,2})
if op>=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg1=g:FilterSelect(tp,f,1,1,nil)
Duel.SendtoHand(tg1,nil,tp)
Duel.ConfirmCards(1-tp,tg1)
g:Sub(tg1)
end
if op>=2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg2=g:FilterSelect(tp,f,2,2,nil,TYPE_MONSTER)
Duel.SendtoHand(tg2,nil,tp)
Duel.ConfirmCards(1-tp,tg2)
g:Sub(tg2)
end
if op==3 then
Duel.SendtoGrave(g,REASON_EFFECT)
end
Duel.ShuffleDeck(tp)
end
--这样的你
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700946
local cm=_G["c"..m]
function cm.initial_effect(c)
local e1=rsef.ACT(c,nil,nil,nil,"rec",nil,nil,nil,cm.tg,cm.op)
local e2=rsef.SV_INDESTRUCTABLE(c,"effect")
local e3=rsef.STF(c,EVENT_LEAVE_FIELD,nil,"de",nil,nil,cm.con,nil,nil,cm.op2)
local e4=rsef.FTF(c,EVENT_PHASE+PHASE_DRAW,{m,0},1,"rec",nil,LOCATION_FZONE,cm.econ,nil,cm.rtg,cm.rop)
e4:SetLabel(1)
--local e5=rsef.FTF(c,m,{m,0},1,"rec",nil,LOCATION_FZONE,cm.econ2,nil,cm.rtg,cm.rop)
local e5=rsef.I(c,{m,0},1,"rec",nil,LOCATION_FZONE,cm.econ2,nil,cm.rtg,cm.rop)
e5:SetLabel(7)
local e6=rsef.FTF(c,EVENT_PHASE+PHASE_BATTLE_START,{m,0},1,"rec",nil,LOCATION_FZONE,cm.econ,nil,cm.rtg,cm.rop)
e6:SetLabel(15)
local e7=rsef.FTF(c,EVENT_PHASE+PHASE_END,{m,0},1,"rec",nil,LOCATION_FZONE,cm.econ,nil,cm.rtg,cm.rop)
e7:SetLabel(21)
--adjust
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e8:SetCode(EVENT_ADJUST)
e8:SetRange(LOCATION_FZONE)
e8:SetCondition(cm.adjustcon)
e8:SetOperation(cm.adjustop)
c:RegisterEffect(e8)
--cannot activate
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD)
e9:SetCode(EFFECT_CANNOT_ACTIVATE)
e9:SetRange(LOCATION_SZONE)
e9:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e9:SetTargetRange(1,1)
e9:SetValue(cm.filter)
c:RegisterEffect(e9)
--cannot set
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD)
e10:SetCode(EFFECT_CANNOT_SSET)
e10:SetRange(LOCATION_SZONE)
e10:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e10:SetTargetRange(1,1)
e10:SetValue(cm.filter2)
c:RegisterEffect(e10)
end
function cm.econ2(e,tp)
return cm.econ(e,tp) and Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and not Duel.CheckPhaseActivity()
end
function cm.filter2(e,c)
return c:IsType(TYPE_FIELD)
end
function cm.adjustcon(e,tp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and Duel.GetTurnPlayer()==tp and not Duel.CheckPhaseActivity()
end
function cm.adjustop(e)
Duel.RaiseEvent(e:GetHandler(),EVENT_CUSTOM+m,e,0,tp,tp,Duel.GetCurrentChain())
end
function cm.rtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function cm.rop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
function cm.econ(e,tp)
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsType(TYPE_MONSTER)
end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)>=e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function cm.filter(e,re,tp)
return re:GetHandler():IsType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
--tg
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetDescription(aux.Stringid(m,1))
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetOperation(cm.tgop)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,5)
e:GetHandler():RegisterEffect(e1)
e:GetHandler():RegisterFlagEffect(m,RESET_PHASE+PHASE_END,0,5)
cm[e:GetHandler()]=e1
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
c:SetTurnCounter(ct)
if ct==5 then
Duel.SendtoGrave(c,REASON_RULE)
c:ResetFlagEffect(m)
end
end
function cm.op(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
if cm.con(e,tp) then
Duel.SetLP(tp,8000)
end
end
function cm.con(e,tp)
local f=function(rc)
return rc:IsSetCard(0x442) and rc:IsType(TYPE_MONSTER)
end
local g=Duel.GetMatchingGroup(f,tp,LOCATION_GRAVE,0,nil)
return g:GetClassCount(Card.GetCode)==#g and #g>0
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.SetLP(tp,8000)
end
\ No newline at end of file
--十人十色之力
if not pcall(function() require("expansions/script/c10199990") end) then require("script/c10199990") end
local m=33700947
local cm=_G["c"..m]
function cm.initial_effect(c)
Duel.EnableGlobalFlag(GLOBALFLAG_SELF_TOGRAVE)
local e1=rsef.ACT(c)
c:SetUniqueOnField(1,0,m)
--pub
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_PUBLIC)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(LOCATION_HAND,0)
c:RegisterEffect(e2)
--tograve
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EFFECT_SELF_TOGRAVE)
e3:SetCondition(cm.sdcon)
c:RegisterEffect(e3)
--halve damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetTargetRange(1,0)
e4:SetCondition(cm.con)
e4:SetValue(cm.val)
c:RegisterEffect(e4)
e4:SetLabel(7)
local e5=rsef.QO(c,nil,nil,1,"th","tg",LOCATION_SZONE,cm.con2,rscost.reglabel(100),cm.thtg,cm.thop)
--disable search
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_CANNOT_TO_HAND)
e6:SetRange(LOCATION_SZONE)
e6:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e6:SetTargetRange(1,1)
e6:SetTarget(aux.TargetBoolFunction(Card.IsLocation,LOCATION_DECK+LOCATION_GRAVE))
e6:SetCondition(cm.con)
c:RegisterEffect(e6)
e6:SetLabel(21)
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsAbleToHand() end
if chk==0 then
if e:GetLabel()~=100 then return false end
return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_HAND,0,1,nil,tp)
end
e:SetLabel(0)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local tc=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_HAND,0,1,1,nil,tp):GetFirst()
Duel.SendtoGrave(tc,REASON_COST)
local f=function(rc,code)
return rc:IsAbleToHand() and not rc:IsCode(code)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,f,tp,LOCATION_GRAVE,0,1,1,nil,tc:GetCode())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_GRAVE)
end
function cm.thop(e)
local tc=rscf.GetTargetCard()
if tc then Duel.SendtoHand(tc,nil,REASON_EFFECT) end
end
function cm.cfilter(c,tp)
local f=function(rc,code)
return rc:IsAbleToHand() and not rc:IsCode(code)
end
return c:IsAbleToGraveAsCost() and Duel.IsExistingTarget(f,tp,LOCATION_GRAVE,0,1,nil,c:GetCode())
end
function cm.val(e,re,dam,r,rp,rc)
return dam/2
end
function cm.sdcon(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_HAND,0)
return #g==0 or g:GetClassCount(Card.GetCode)<#g
end
function cm.con2(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)>=14
end
function cm.con(e)
local g=Duel.GetFieldGroup(e:GetHandlerPlayer(),LOCATION_GRAVE,0)
return g:GetClassCount(Card.GetCode)>=e:GetLabel()
end
\ No newline at end of file
--
local m=33700966
local cm=_G["c"..m]
function cm.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
aux.AddXyzProcedureLevelFree(c,nil,cm.xyzcheck,2,2)
--immune spell
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.efilter)
c:RegisterEffect(e1)
--add code
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_ONFIELD,LOCATION_ONFIELD)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(m)
c:RegisterEffect(e2)
--code
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(cm.cost)
e3:SetCondition(cm.con)
e3:SetOperation(cm.op)
c:RegisterEffect(e3)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function cm.cost(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 cm.op(e,tp,eg,ep,ev,re,r,rp,chk)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_GRAVE,LOCATION_GRAVE)
e2:SetCode(EFFECT_CHANGE_CODE)
e2:SetValue(m)
Duel.RegisterEffect(e2,tp)
end
function cm.xyzcheck(g)
return g:GetClassCount(Card.GetCode)==1
end
function cm.efilter(e,te)
return te:IsActiveType(TYPE_SPELL)
end
\ No newline at end of file
...@@ -2,30 +2,32 @@ ...@@ -2,30 +2,32 @@
#Nemoma 337 0x440-0x44f #Nemoma 337 0x440-0x44f
#狂
!setname 0x442 动物朋友(Anifriends !setname 0x442 动物朋友(Anifriends
!counter 0x442 太阳之道指示物 (Way of the Sun !counter 0x442 太阳之道指示物 (Way of the Sun
#纸
!setname 0x443 霓火 (Neonfire !setname 0x443 霓火 (Neonfire
#纸
!setname 0x3440 Proto-Summoner (魔物使) !setname 0x3440 Proto-Summoner (魔物使)
!setname 0x6440 Protoform (魔物) !setname 0x6440 Protoform (魔物)
!setname 0x5440 琪比摩斯 (Chibi-Moth !setname 0x5440 琪比摩斯 (Chibi-Moth
#强
!setname 0x1449 无心械姬 (GearGal !setname 0x1449 无心械姬 (GearGal
!setname 0x3449 慧心花姬 (NEXTGal !setname 0x3449 慧心花姬 (NEXTGal
!setname 0x6449 革新者 (Adventer !setname 0x6449 革新者 (Adventer
#???
!setname 0x444 天降妹抖 (Heavenly Maid !setname 0x444 天降妹抖 (Heavenly Maid
#???
!setname 0x5449 阻抗 (Resistor !setname 0x5449 阻抗 (Resistor
#???
!setname 0x344a 妖幻战姬(T.Fairies !setname 0x344a 妖幻战姬(T.Fairies
!setname 0x644a 妖幻幼精(Tzermellend Fairy !setname 0x644a 妖幻幼精(Tzermellend Fairy
#???
!setname 0x144b 虚毒(Voison !setname 0x144b 虚毒(Voison
!setname 0x144c VOICEROIDVOICEROID !setname 0x144c VOICEROIDVOICEROID
!setname 0x344c 虚拟主播(VLiver !setname 0x344c 虚拟主播(VLiver
!setname 0x44f 【背景音台】(【Sound Stage】) !setname 0x44f 【背景音台】(【Sound Stage】)
!setname 0x44e 铁虹(Rainblo
!setname 0x445 虚拟YouTuberVTuber
!counter 0x144b 虚空指示物 !counter 0x144b 虚空指示物(Void Counter
\ No newline at end of file \ 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