Commit 4c851ef9 authored by tsubaki's avatar tsubaki

1.999ze

parent 032bd407
--银雨·善恶之镜
local Cardno=74560022
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cCardno.accon)
e1:SetOperation(cCardno.activate)
c:RegisterEffect(e1)
--syn
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SYNCHRO_MATERIAL)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0,LOCATION_MZONE)
e2:SetTarget(cCardno.synfilter)
c:RegisterEffect(e2)
--synlimit
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(1,0)
e3:SetTarget(cCardno.splimit)
--c:RegisterEffect(e3)
end
--synlimit
function cCardno.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return not c:IsSetCard(0x456) and bit.band(sumtype,SUMMON_TYPE_SYNCHRO)==SUMMON_TYPE_SYNCHRO
end
--syn
function cCardno.synfilter(e,c)
return c:IsFaceup() and c:IsCanBeSynchroMaterial() and c:GetOwner()~=c:GetControler()
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SYNCHRO_MATERIAL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--Activate
function cCardno.acfilter(c)
return c:IsSetCard(0x456) and c:IsAbleToHand() and c:IsFaceup()
end
function cCardno.accon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cCardno.acfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function cCardno.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsExistingMatchingCard(cCardno.acfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(Cardno,0)) then
local g = Duel.SelectMatchingCard(tp,cCardno.acfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,c)
Duel.SendtoHand(g,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
...@@ -108,12 +108,14 @@ function cCardno.hsop(e,tp,eg,ep,ev,re,r,rp) ...@@ -108,12 +108,14 @@ function cCardno.hsop(e,tp,eg,ep,ev,re,r,rp)
Duel.Overlay(exc,tg) Duel.Overlay(exc,tg)
Duel.SpecialSummon(exc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(exc,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
exc:CompleteProcedure() exc:CompleteProcedure()
--can not attack if not exc:IsSetCard(0x5208) then
local e1=Effect.CreateEffect(c) --can not attack
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_CANNOT_ATTACK) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetCode(EFFECT_CANNOT_ATTACK)
exc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
exc:RegisterEffect(e1)
end
end end
end end
--INDESTRUCT --INDESTRUCT
......
--猎梦者✿LEVEL:D
local Cardno=74561057
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
c:EnableReviveLimit()
--ritual summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_RELEASE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,Cardno)
e1:SetTarget(cCardno.rstg)
e1:SetOperation(cCardno.rsop)
c:RegisterEffect(e1)
--lv&atk up
local e2=Effect.CreateEffect(c)
e2:SetCategory(0)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cCardno.lvcon)
e2:SetOperation(cCardno.lvop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_DECK+LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_EXTRA)
e3:SetTarget(cCardno.disable)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_DISABLE_EFFECT)
c:RegisterEffect(e4)
end
--disable
function cCardno.disable(e,c)
local lv=e:GetHandler():GetLevel()
local tlv=c:GetLevel()
if not tlv and c:IsType(TYPE_XYZ) then tlv=c:GetRank() end
return lv>0 and tlv>0 and lv % tlv == 0
end
--lv&atk up
function cCardno.lvcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function cCardno.lvop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetValue(1)
c:RegisterEffect(e1)
local atk=c:GetBaseAttack()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(atk+100)
c:RegisterEffect(e2)
end
--ritual summon
function cCardno.mfilter(c,rc)
return c:IsCode(16000006) and c:IsCanBeRitualMaterial(rc)
end
function cCardno.rstg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(cCardno.mfilter,tp,LOCATION_MZONE,0,1,nil,c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,0)
end
function cCardno.rsop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.IsExistingMatchingCard(cCardno.mfilter,tp,LOCATION_MZONE,0,1,nil,c) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true) then
local tg=Duel.SelectMatchingCard(tp,cCardno.mfilter,tp,LOCATION_MZONE,0,1,1,nil,c)
c:SetMaterial(tg)
Duel.ReleaseRitualMaterial(tg)
Duel.BreakEffect()
Duel.SpecialSummon(c,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
c:CompleteProcedure()
local lv=c:GetLevel()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(lv*2)
c:RegisterEffect(e1)
local atk=c:GetBaseAttack()
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_BASE_ATTACK)
e2:SetValue(atk*2)
c:RegisterEffect(e2)
end
end
\ No newline at end of file
...@@ -19,16 +19,22 @@ function cCardno.initial_effect(c) ...@@ -19,16 +19,22 @@ function cCardno.initial_effect(c)
e3:SetCondition(cCardno.handcon) e3:SetCondition(cCardno.handcon)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function cCardno.dfilter(c,e,tp)
return c:IsSetCard(0x497) and c:IsType(TYPE_MONSTER)
end
function cCardno.handcon(e) function cCardno.handcon(e)
return Duel.IsExistingMatchingCard(cCardno.dfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.GetMatchingGroupCount(nil,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil)==0
end end
function cCardno.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cCardno.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local flag=Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x128a,2,REASON_COST) local flag1=Duel.CheckLPCost(tp,1200)
if chk==0 then return flag end local flag2=Duel.IsCanRemoveCounter(tp,LOCATION_ONFIELD,0,0x128a,2,REASON_COST)
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x128a,2,REASON_COST) if chk==0 then return flag1 or flag2 end
if flag2 then
if flag1 and not Duel.SelectYesNo(tp,aux.Stringid(Cardno,0)) then
Duel.PayLPCost(tp,1200)
else
Duel.RemoveCounter(tp,LOCATION_ONFIELD,0,0x128a,2,REASON_COST)
end
else
Duel.PayLPCost(tp,1200)
end
end end
function cCardno.cfilter(c) function cCardno.cfilter(c)
return ( c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP) )and c:IsDestructable() return ( c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP) )and c:IsDestructable()
......
--上位世界
local Cardno=74562019
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cCardno.actcon)
c:RegisterEffect(e1)
--Destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_BOTH_SIDE+EFFECT_FLAG_CARD_TARGET)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetRange(LOCATION_SZONE)
e2:SetCost(cCardno.decost)
e2:SetTarget(cCardno.detg)
e2:SetOperation(cCardno.deop)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_BOTH_SIDE)
e3:SetDescription(aux.Stringid(Cardno,1))
e3:SetRange(LOCATION_SZONE)
e3:SetCondition(cCardno.discon)
e3:SetCost(cCardno.discost)
e3:SetTarget(cCardno.distg)
e3:SetOperation(cCardno.disop)
c:RegisterEffect(e3)
--to field
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetDescription(aux.Stringid(Cardno,2))
e4:SetRange(LOCATION_DECK)
e4:SetCondition(cCardno.tfcon)
e4:SetOperation(cCardno.tfop)
c:RegisterEffect(e4)
end
function cCardno.actcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
--to field
function cCardno.tfcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsSetCard,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil,0x8a1)
return g:GetClassCount(Card.GetCode)==g:GetCount() and g:GetCount() >= 2
end
function cCardno.tfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
end
end
--disable
function cCardno.discon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()==e:GetHandler()
end
function cCardno.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,nil,1,1,REASON_COST,nil)
end
function cCardno.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,e:GetHandler(),1,tp,LOCATION_FZONE)
end
function cCardno.disop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.NegateEffect(ev)
end
end
--Destroy
function cCardno.decost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and not c:IsStatus(STATUS_CHAINING) end
Duel.DiscardHand(tp,nil,1,1,REASON_COST,nil)
end
function cCardno.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and chkc:IsDestructable() end
if chk==0 then return Duel.IsExistingTarget(Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,nil,1,tp,LOCATION_ONFIELD)
end
function cCardno.deop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
local tc=Duel.GetFirstTarget()
Duel.Destroy(tc,REASON_EFFECT)
end
end
\ No newline at end of file
--月之天使✿萨丽爱尔
local Cardno=74562021
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--xyz summon
c:EnableReviveLimit()
Nef.AddXyzProcedureWithDesc(c,aux.FilterBoolFunction(Card.IsSetCard,0x208),12,2,aux.Stringid(Cardno,0))
-- xyz
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(Cardno,1))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCountLimit(1,Cardno)
e1:SetRange(LOCATION_EXTRA)
e1:SetCondition(cCardno.xyzcon)
e1:SetOperation(cCardno.xyzop)
e1:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e1)
--SPSUMMON_SUCCESS
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,2))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetCondition(cCardno.sscon)
e2:SetTarget(cCardno.sstg)
e2:SetOperation(cCardno.ssop)
c:RegisterEffect(e2)
--Destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(Cardno,3))
e3:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e3:SetCondition(cCardno.decon)
e3:SetTarget(cCardno.detg)
e3:SetOperation(cCardno.deop)
c:RegisterEffect(e3)
--SpecialSummon
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(aux.Stringid(Cardno,4))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetCountLimit(1)
e4:SetRange(LOCATION_MZONE)
e4:SetTarget(cCardno.sptg)
e4:SetOperation(cCardno.spop)
c:RegisterEffect(e4)
--check overlay group when destroy
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_DESTROY)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetRange(LOCATION_MZONE)
e0:SetOperation(cCardno.ckop)
c:RegisterEffect(e0)
end
function cCardno.ckop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
c:ResetFlagEffect(Cardno)
local nowg=c:GetOverlayGroup()
c:RegisterFlagEffect(Cardno,0,0,0,nowg:GetCount())
end
--SpecialSummon
function cCardno.spfilter2(c,e,tp)
return c:IsSetCard(0x298) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsCode(74562021)
end
function cCardno.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(cCardno.spfilter2,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,nil)
end
function cCardno.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,cCardno.spfilter2,tp,LOCATION_HAND+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
--Destroy
function cCardno.decon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetFlagEffectLabel(Cardno)>0
end
function cCardno.spfilter(c,e,tp)
return c:IsSetCard(0x298) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function cCardno.detg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if chk==0 then return flag1 or flag2 end
if flag1 then Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE),Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE),tp,LOCATION_MZONE) end
if flag2 then Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) end
end
function cCardno.deop(e,tp,eg,ep,ev,re,r,rp)
local flag1 = Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0
local flag2 = Duel.IsExistingMatchingCard(cCardno.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) and Duel.GetMZoneCount(tp)>0
if flag1 then
local g1=Duel.GetFieldGroup(tp,LOCATION_MZONE,LOCATION_MZONE)
Duel.Destroy(g1,REASON_EFFECT)
end
if flag2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectMatchingCard(tp,cCardno.spfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
--SPSUMMON_SUCCESS
function cCardno.sscon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_XYZ
end
function cCardno.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE)>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,Duel.GetFieldGroup(tp,0,LOCATION_SZONE),Duel.GetFieldGroupCount(tp,0,LOCATION_SZONE),1-tp,LOCATION_SZONE)
end
function cCardno.ssop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,0,LOCATION_SZONE)
if g:GetCount()>0 then Duel.Destroy(g,REASON_EFFECT) end
end
-- xyz
function cCardno.xyzfilter(c,tp,xyzc)
return c:IsFaceup() and c:IsCanBeXyzMaterial(xyzc) and ( (c:IsType(TYPE_XYZ) and c:IsRank(12) ) or (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x298) ) )
end
function cCardno.xyzfilter2(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x298) and c:IsAbleToDeck()
end
function cCardno.xyzcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
if Duel.GetLocationCountFromEx(tp)<0 then return false end
return Duel.IsExistingMatchingCard(cCardno.xyzfilter,tp,LOCATION_MZONE,0,1,nil,tp,c)
end
function cCardno.xyzop(e,tp,eg,ep,ev,re,r,rp,c)
--Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
--local dg = Duel.SelectMatchingCard(tp,cCardno.xyzfilter2,tp,LOCATION_HAND,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local mg = Duel.SelectMatchingCard(tp,cCardno.xyzfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,c)
local tc=mg:GetFirst()
if not tc then return end
--Duel.SendtoDeck(dg,nil,2,REASON_EFFECT)
local mg2=tc:GetOverlayGroup()
if mg2:GetCount()~=0 then
Duel.Overlay(c,mg2)
end
c:SetMaterial(mg)
Duel.Overlay(c,mg)
end
\ No newline at end of file
--咒怨的邪眼✿萨丽爱尔
local Cardno=74562025
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cCardno.ntcon)
c:RegisterEffect(e2)
--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)
--battle
local e1=e3:Clone()
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--damage end
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DEFCHANGE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cCardno.lpcon)
e6:SetOperation(cCardno.lpop)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(cCardno.rtdcon)
e7:SetTarget(cCardno.rtdtg)
e7:SetOperation(cCardno.rtdop)
c:RegisterEffect(e7)
end
function cCardno.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cCardno.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 or e:GetHandler():GetAttackedCount()>0
end
function cCardno.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.SetLP(1-tp,math.ceil(Duel.GetLP(1-tp)/2))
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if g:GetCount() > 0 then
local tc=g:GetFirst()
while tc do
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_SET_ATTACK_FINAL)
e5:SetValue(0)
e5:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetCode(EFFECT_SET_DEFENSE_FINAL)
e6:SetValue(0)
tc:RegisterEffect(e6)
tc=g:GetNext()
end
end
end
function cCardno.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cCardno.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.rtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--引斥的邪眼✿萨丽爱尔
local Cardno=74562026
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cCardno.ntcon)
c:RegisterEffect(e2)
--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)
--battle
local e1=e3:Clone()
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--damage end
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_TODECK+CATEGORY_DRAW)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cCardno.lpcon)
e6:SetTarget(cCardno.lptg)
e6:SetOperation(cCardno.lpop)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(cCardno.rtdcon)
e7:SetTarget(cCardno.rtdtg)
e7:SetOperation(cCardno.rtdop)
c:RegisterEffect(e7)
end
function cCardno.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cCardno.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 or e:GetHandler():GetAttackedCount()>0
end
function cCardno.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local num=g:GetCount()
if chk==0 then return num>0 end
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,num,tp,LOCATION_ONFIELD)
end
function cCardno.filter(c,tp)
return c:IsControler(tp) and (c:IsLocation(LOCATION_DECK) or c:IsLocation(LOCATION_EXTRA))
end
function cCardno.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,c)
local total=Duel.SendtoDeck(g,nil,2,REASON_EFFECT)
Duel.Damage(1-tp,total*200,REASON_EFFECT)
local num1=g:FilterCount(cCardno.filter,nil,tp)
local num2=g:FilterCount(cCardno.filter,nil,1-tp)
if num1>0 then
Duel.ShuffleDeck(tp)
Duel.Draw(tp,num1,REASON_EFFECT)
end
if num2>0 then
Duel.ShuffleDeck(1-tp)
Duel.Draw(1-tp,num2,REASON_EFFECT)
end
end
function cCardno.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cCardno.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.rtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--静止的邪眼✿萨丽爱尔
local Cardno=74562027
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cCardno.ntcon)
c:RegisterEffect(e2)
--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)
--battle
local e1=e3:Clone()
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--damage end
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cCardno.lpcon)
e6:SetOperation(cCardno.lpop)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(cCardno.rtdcon)
e7:SetTarget(cCardno.rtdtg)
e7:SetOperation(cCardno.rtdop)
c:RegisterEffect(e7)
end
function cCardno.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cCardno.lpcon(e,tp,eg,ep,ev,re,r,rp)
return true
end
function cCardno.aclimit(e,re,tp)
return re:GetHandler():IsLocation(LOCATION_ONFIELD)
end
function cCardno.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetRange(LOCATION_MZONE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(0,1)
e1:SetValue(cCardno.aclimit)
Duel.RegisterEffect(e1,tp)
end
function cCardno.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cCardno.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.rtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
--乱魔的邪眼✿萨丽爱尔
local Cardno=74562028
local cCardno=_G["c"..Cardno]
function cCardno.initial_effect(c)
--summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(Cardno,0))
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(cCardno.ntcon)
c:RegisterEffect(e2)
--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)
--battle
local e1=e3:Clone()
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e1)
--damage end
local e6=Effect.CreateEffect(c)
e6:SetCategory(CATEGORY_REMOVE)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e6:SetCode(EVENT_PHASE+PHASE_BATTLE)
e6:SetCountLimit(1)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(cCardno.lpcon)
e6:SetTarget(cCardno.lptg)
e6:SetOperation(cCardno.lpop)
c:RegisterEffect(e6)
--to deck
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e7:SetCode(EVENT_PHASE+PHASE_STANDBY)
e7:SetCountLimit(1)
e7:SetRange(LOCATION_MZONE)
e7:SetCondition(cCardno.rtdcon)
e7:SetTarget(cCardno.rtdtg)
e7:SetOperation(cCardno.rtdop)
c:RegisterEffect(e7)
end
function cCardno.ntcon(e,c,minc)
if c==nil then return true end
return minc==0 and c:IsLevelAbove(5)
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function cCardno.lpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetBattledGroupCount()>0 or e:GetHandler():GetAttackedCount()>0
end
function cCardno.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(cCardno.filter,tp,0,LOCATION_GRAVE,nil)
local num=g:GetCount()
if num>0 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,num,0,LOCATION_GRAVE)
end
end
function cCardno.filter(c,tp)
return c:IsAbleToRemove() and (c:IsType(TYPE_SPELL) or c:IsType(TYPE_TRAP))
end
function cCardno.lpop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(cCardno.filter,tp,0,LOCATION_GRAVE,nil)
if g:GetCount()>0 then Duel.Remove(g,POS_FACEUP,REASON_EFFECT) end
end
function cCardno.rtdcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function cCardno.rtdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function cCardno.rtdop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
end
end
...@@ -15,7 +15,7 @@ function c74563005.initial_effect(c) ...@@ -15,7 +15,7 @@ function c74563005.initial_effect(c)
e12:SetType(EFFECT_TYPE_QUICK_O) e12:SetType(EFFECT_TYPE_QUICK_O)
e12:SetRange(LOCATION_MZONE) e12:SetRange(LOCATION_MZONE)
e12:SetCode(EVENT_FREE_CHAIN) e12:SetCode(EVENT_FREE_CHAIN)
e12:SetCountLimit(2,74563005) e12:SetCountLimit(1,74563005)
e12:SetTarget(c74563005.eqtg) e12:SetTarget(c74563005.eqtg)
e12:SetOperation(c74563005.eqop) e12:SetOperation(c74563005.eqop)
c:RegisterEffect(e12) c:RegisterEffect(e12)
...@@ -25,7 +25,7 @@ function c74563005.initial_effect(c) ...@@ -25,7 +25,7 @@ function c74563005.initial_effect(c)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(2,74563004) e3:SetCountLimit(1,74563004)
e3:SetTarget(c74563005.target) e3:SetTarget(c74563005.target)
e3:SetOperation(c74563005.activate) e3:SetOperation(c74563005.activate)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -12,7 +12,7 @@ function c74563009.initial_effect(c) ...@@ -12,7 +12,7 @@ function c74563009.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY) e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,74563009) e4:SetCountLimit(1)
e4:SetTarget(c74563009.target1) e4:SetTarget(c74563009.target1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
......
...@@ -13,7 +13,7 @@ function c74563010.initial_effect(c) ...@@ -13,7 +13,7 @@ function c74563010.initial_effect(c)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY) e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetTarget(c74563010.rmtg1) e4:SetTarget(c74563010.rmtg1)
e4:SetCountLimit(1,74563010) e4:SetCountLimit(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c74563010.spfilter(c,e,tp) function c74563010.spfilter(c,e,tp)
......
...@@ -13,7 +13,7 @@ function c74563011.initial_effect(c) ...@@ -13,7 +13,7 @@ function c74563011.initial_effect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F) e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_STANDBY) e4:SetCode(EVENT_PHASE+PHASE_STANDBY)
e4:SetRange(LOCATION_SZONE) e4:SetRange(LOCATION_SZONE)
e4:SetCountLimit(1,74563011) e4:SetCountLimit(1)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c74563011.filter1(c) function c74563011.filter1(c)
......
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
function c74563014.initial_effect(c) function c74563014.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563014.matfilter,true) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c74563014.con1)
e1:SetOperation(c74563014.op1)
c:RegisterEffect(e1)
--equip --equip
local e12=Effect.CreateEffect(c) local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_REMOVE) e12:SetCategory(CATEGORY_REMOVE)
...@@ -25,9 +31,6 @@ function c74563014.initial_effect(c) ...@@ -25,9 +31,6 @@ function c74563014.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
c74563014.DescSetName=0x258 c74563014.DescSetName=0x258
function c74563014.matfilter(c)
return c:IsFusionAttribute(ATTRIBUTE_WIND+ATTRIBUTE_DARK)
end
function c74563014.drcon(e,tp,eg,ep,ev,re,r,rp) function c74563014.drcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp return ep==tp
end end
...@@ -100,4 +103,83 @@ function c74563014.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -100,4 +103,83 @@ function c74563014.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
tg=dg:GetNext() tg=dg:GetNext()
end end
end
function c74563014.exfilter1(c,fc)
return c74563014.allfilter1(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove()
end
function c74563014.allfilter1(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER)
and (c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_WIND) or c:IsFusionAttribute(ATTRIBUTE_DARK))
end
--
function c74563014.CheckFusionFilter1(c,sg,tc)
local check1=0
local check2=0
local sc=sg:GetFirst()
while sc do
if sc:IsFusionSetCard(0x258) then check1=1 end
if (sc:IsFusionAttribute(ATTRIBUTE_WIND) or sc:IsFusionAttribute(ATTRIBUTE_DARK)) then check2=1 end
sc=sg:GetNext()
end
return (check1==0 and (tc:IsFusionSetCard(0x258)))
or (check2==0 and (tc:IsFusionAttribute(ATTRIBUTE_WIND) or tc:IsFusionAttribute(ATTRIBUTE_DARK)))
end
function c74563014.CheckRecursive1(c,mg,sg,exg,tp,fc,chkf)
--if exg and exg:IsContains(c) then return false end
if sg:GetCount()>0 and not sg:IsExists(c74563014.CheckFusionFilter1,1,nil,sg,c) then return false end
sg:AddCard(c)
if Duel.GetLocationCountFromEx(tp,tp,sg,c)<0 then return false end
local res=false
if sg:GetCount()==2 then
res=(chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then res=false end
else
res=mg:IsExists(c74563014.CheckRecursive1,1,sg,mg,sg,exg,tp,fc,PLAYER_NONE)
end
sg:RemoveCard(c)
return res
end
--
function c74563014.con1(e,g,gc,chkfnf)
if g==nil then return true end
local sg=Group.CreateGroup()
local chkf=(chkfnf & 0xff)
local c=e:GetHandler()
local tp=c:GetControler()
local mg=g:Filter(c74563014.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563014.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
if gc then return c74563014.allfilter1(gc,c)
and c74563014.CheckRecursive1(gc,mg,sg,exg,tp,c,chkf) end
return mg:IsExists(c74563014.CheckRecursive1,1,sg,mg,sg,exg,tp,c,chkf)
end
--
function c74563014.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler()
local chkf=(chkfnf & 0xff)
local mg=eg:Filter(c74563014.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563014.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c74563014.CheckRecursive1,1,1,sg,mg,sg,exg,tp,c,chkf)
sg:Merge(g)
until sg:GetCount()==2
Duel.SetFusionMaterial(sg)
end
c74563014.OriginalSetMaterial=Card.SetMaterial
function c74563014.SetMaterial(c,g)
c74563014.OriginalSetMaterial(c,g)
if not g then return end
local rg1=g:Filter(c74563014.rfilter,nil,1)
if rg1:GetCount()>0 then
g:Sub(rg1)
Duel.Remove(rg1,POS_FACEUP,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
Duel.SendtoGrave(g,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
function c74563014.rfilter(c,l)
return c:IsLocation(LOCATION_GRAVE) and c:IsCode(74563024)
end end
\ No newline at end of file
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
function c74563015.initial_effect(c) function c74563015.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563015.matfilter,true) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c74563015.con1)
e1:SetOperation(c74563015.op1)
c:RegisterEffect(e1)
--equip --equip
local e12=Effect.CreateEffect(c) local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_DISABLE) e12:SetCategory(CATEGORY_DISABLE)
...@@ -51,7 +57,13 @@ function c74563015.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,7 +57,13 @@ function c74563015.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function c74563015.desfilter2(c,num) function c74563015.desfilter2(c,num)
return c:IsFaceup() and c74563015.customdef(c)<=num if c:IsType(TYPE_LINK) then
return num>1200
elseif c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup() then
return num>1200
else
return c:IsDefenseBelow(num) and c:IsFaceup()
end
end end
function c74563015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c74563015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -62,39 +74,27 @@ function c74563015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,39 +74,27 @@ function c74563015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil,lp) and counter1-counter2<=0 end if chk==0 then return Duel.IsExistingMatchingCard(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,1,nil,lp) and counter1-counter2<=0 end
Duel.RegisterFlagEffect(tp,74563015,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(tp,74563015,RESET_PHASE+PHASE_END,0,1)
end end
function c74563015.customdef(c) function c74563015.gselect(g,num)
if c:IsType(TYPE_LINK|TYPE_SPELL|TYPE_TRAP) then local def=0
return 1200 local tc=g:GetFirst()
else while tc do
return c:GetDefense() if tc:IsDefenseAbove(0) and tc:IsFaceup() then
end def=def+tc:GetDefense()
else
def=def+1200
end
tc=g:GetNext()
end
return def<=num
end end
function c74563015.eqop(e,tp,eg,ep,ev,re,r,rp) function c74563015.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local num=e:GetLabel() local num=e:GetLabel()
local g=Duel.GetMatchingGroup(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil,num) local g=Duel.GetMatchingGroup(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,nil,num)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
local dg=Group.CreateGroup() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
while true do local dg=g:SelectSubGroup(tp,c74563015.gselect,false,1,#g,num)
g=Duel.GetMatchingGroup(c74563015.desfilter2,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE+LOCATION_REMOVED,dg,num) local tc=dg:GetFirst()
if #g==0 then
break
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local sc=g:SelectUnselect(dg,tp,#dg>0,#dg>0,1,99)
if not sc then
break
elseif g:IsContains(sc) then
g:RemoveCard(sc)
dg:AddCard(sc)
num=num-c74563015.customdef(sc)
else
dg:RemoveCard(sc)
g:AddCard(sc)
num=num+c74563015.customdef(sc)
end
end
local tc=dg:GetFirst()
while tc do while tc do
Duel.NegateRelatedChain(tc,RESET_TURN_SET) Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
...@@ -122,5 +122,84 @@ function c74563015.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -122,5 +122,84 @@ function c74563015.eqop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
tc=dg:GetNext() tc=dg:GetNext()
end end
end
function c74563015.exfilter1(c,fc)
return c74563015.allfilter1(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove()
end
function c74563015.allfilter1(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER)
and (c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_WATER) or c:IsFusionAttribute(ATTRIBUTE_LIGHT))
end
--
function c74563015.CheckFusionFilter1(c,sg,tc)
local check1=0
local check2=0
local sc=sg:GetFirst()
while sc do
if sc:IsFusionSetCard(0x258) then check1=1 end
if (sc:IsFusionAttribute(ATTRIBUTE_WATER) or sc:IsFusionAttribute(ATTRIBUTE_LIGHT)) then check2=1 end
sc=sg:GetNext()
end
return (check1==0 and (tc:IsFusionSetCard(0x258)))
or (check2==0 and (tc:IsFusionAttribute(ATTRIBUTE_LIGHT) or tc:IsFusionAttribute(ATTRIBUTE_WATER)))
end
function c74563015.CheckRecursive1(c,mg,sg,exg,tp,fc,chkf)
--if exg and exg:IsContains(c) then return false end
if sg:GetCount()>0 and not sg:IsExists(c74563015.CheckFusionFilter1,1,nil,sg,c) then return false end
sg:AddCard(c)
if Duel.GetLocationCountFromEx(tp,tp,sg,c)<0 then return false end
local res=false
if sg:GetCount()==2 then
res=(chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then res=false end
else
res=mg:IsExists(c74563015.CheckRecursive1,1,sg,mg,sg,exg,tp,fc,PLAYER_NONE)
end
sg:RemoveCard(c)
return res
end
--
function c74563015.con1(e,g,gc,chkfnf)
if g==nil then return true end
local sg=Group.CreateGroup()
local chkf=(chkfnf & 0xff)
local c=e:GetHandler()
local tp=c:GetControler()
local mg=g:Filter(c74563015.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563015.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
if gc then return c74563015.allfilter1(gc,c)
and c74563015.CheckRecursive1(gc,mg,sg,exg,tp,c,chkf) end
return mg:IsExists(c74563015.CheckRecursive1,1,sg,mg,sg,exg,tp,c,chkf)
end
--
function c74563015.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler()
local chkf=(chkfnf & 0xff)
local mg=eg:Filter(c74563015.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563015.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c74563015.CheckRecursive1,1,1,sg,mg,sg,exg,tp,c,chkf)
sg:Merge(g)
until sg:GetCount()==2
Duel.SetFusionMaterial(sg)
end
c74563015.OriginalSetMaterial=Card.SetMaterial
function c74563015.SetMaterial(c,g)
c74563015.OriginalSetMaterial(c,g)
if not g then return end
local rg1=g:Filter(c74563015.rfilter,nil,1)
if rg1:GetCount()>0 then
g:Sub(rg1)
Duel.Remove(rg1,POS_FACEUP,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
Duel.SendtoGrave(g,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end end
function c74563015.rfilter(c,l)
return c:IsLocation(LOCATION_GRAVE) and c:IsCode(74563024)
end
\ No newline at end of file
...@@ -2,7 +2,13 @@ ...@@ -2,7 +2,13 @@
function c74563016.initial_effect(c) function c74563016.initial_effect(c)
--fusion material --fusion material
c:EnableReviveLimit() c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x258),c74563016.matfilter,true) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c74563016.con1)
e1:SetOperation(c74563016.op1)
c:RegisterEffect(e1)
--equip --equip
local e12=Effect.CreateEffect(c) local e12=Effect.CreateEffect(c)
e12:SetCategory(CATEGORY_DESTROY) e12:SetCategory(CATEGORY_DESTROY)
...@@ -88,4 +94,83 @@ function c74563016.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,4 +94,83 @@ function c74563016.eqop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=g:SelectSubGroup(tp,c74563016.gselect,false,1,#g,num) local dg=g:SelectSubGroup(tp,c74563016.gselect,false,1,#g,num)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
end
function c74563016.exfilter1(c,fc)
return c74563016.allfilter1(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove()
end
function c74563016.allfilter1(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER)
and (c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_EARTH) or c:IsFusionAttribute(ATTRIBUTE_FIRE))
end
--
function c74563016.CheckFusionFilter1(c,sg,tc)
local check1=0
local check2=0
local sc=sg:GetFirst()
while sc do
if sc:IsFusionSetCard(0x258) then check1=1 end
if (sc:IsFusionAttribute(ATTRIBUTE_EARTH) or sc:IsFusionAttribute(ATTRIBUTE_FIRE)) then check2=1 end
sc=sg:GetNext()
end
return (check1==0 and (tc:IsFusionSetCard(0x258)))
or (check2==0 and (tc:IsFusionAttribute(ATTRIBUTE_EARTH) or tc:IsFusionAttribute(ATTRIBUTE_FIRE)))
end
function c74563016.CheckRecursive1(c,mg,sg,exg,tp,fc,chkf)
--if exg and exg:IsContains(c) then return false end
if sg:GetCount()>0 and not sg:IsExists(c74563016.CheckFusionFilter1,1,nil,sg,c) then return false end
sg:AddCard(c)
if Duel.GetLocationCountFromEx(tp,tp,sg,c)<0 then return false end
local res=false
if sg:GetCount()==2 then
res=(chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then res=false end
else
res=mg:IsExists(c74563016.CheckRecursive1,1,sg,mg,sg,exg,tp,fc,PLAYER_NONE)
end
sg:RemoveCard(c)
return res
end
--
function c74563016.con1(e,g,gc,chkfnf)
if g==nil then return true end
local sg=Group.CreateGroup()
local chkf=(chkfnf & 0xff)
local c=e:GetHandler()
local tp=c:GetControler()
local mg=g:Filter(c74563016.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563016.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
if gc then return c74563016.allfilter1(gc,c)
and c74563016.CheckRecursive1(gc,mg,sg,exg,tp,c,chkf) end
return mg:IsExists(c74563016.CheckRecursive1,1,sg,mg,sg,exg,tp,c,chkf)
end
--
function c74563016.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler()
local chkf=(chkfnf & 0xff)
local mg=eg:Filter(c74563016.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563016.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c74563016.CheckRecursive1,1,1,sg,mg,sg,exg,tp,c,chkf)
sg:Merge(g)
until sg:GetCount()==2
Duel.SetFusionMaterial(sg)
end
c74563016.OriginalSetMaterial=Card.SetMaterial
function c74563016.SetMaterial(c,g)
c74563016.OriginalSetMaterial(c,g)
if not g then return end
local rg1=g:Filter(c74563016.rfilter,nil,1)
if rg1:GetCount()>0 then
g:Sub(rg1)
Duel.Remove(rg1,POS_FACEUP,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
Duel.SendtoGrave(g,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
function c74563016.rfilter(c,l)
return c:IsLocation(LOCATION_GRAVE) and c:IsCode(74563024)
end end
\ No newline at end of file
...@@ -30,7 +30,7 @@ function c74563018.initial_effect(c) ...@@ -30,7 +30,7 @@ function c74563018.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c74563018.cfilter(c) function c74563018.cfilter(c)
return (c:IsSetCard(0x177) or c:IsSetCard(0x813)) and c:IsType(TYPE_SPELL) and not c:IsPublic() return (c:IsSetCard(0x177) or c:IsSetCard(0x813) or c:GetOriginalCode()==(22100) or c:GetOriginalCode()==(22117)) and c:IsType(TYPE_SPELL) and not c:IsPublic()
end end
function c74563018.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c74563018.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563018.cfilter,tp,LOCATION_HAND,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c74563018.cfilter,tp,LOCATION_HAND,0,1,nil) end
...@@ -48,6 +48,19 @@ function c74563018.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,6 +48,19 @@ function c74563018.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
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,1)
e1:SetValue(c74563018.val)
e1:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e1,tp)
end
function c74563018.val(e,re,dam,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then
return math.floor(dam/2)
else return dam end
end end
function c74563018.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c74563018.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)end if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil)end
......
...@@ -32,7 +32,7 @@ function c74563021.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -32,7 +32,7 @@ function c74563021.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST) Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end end
function c74563021.filter(c) function c74563021.filter(c)
return c:IsSetCard(0x46) and c:IsType(TYPE_SPELL) and c:IsAbleToHand() return c:IsCode(74563022) and c:IsAbleToHand()
end end
function c74563021.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c74563021.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c74563021.filter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c74563021.filter,tp,LOCATION_DECK,0,1,nil) end
...@@ -65,7 +65,7 @@ function c74563021.atkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,7 +65,7 @@ function c74563021.atkop(e,tp,eg,ep,ev,re,r,rp)
e4:SetCondition(c74563021.condition) e4:SetCondition(c74563021.condition)
e4:SetTarget(c74563021.atktg) e4:SetTarget(c74563021.atktg)
e4:SetValue(c74563021.atkval) e4:SetValue(c74563021.atkval)
e4:SetReset(RESET_PHASE+PHASE_END,2) e4:SetReset(RESET_PHASE+PHASE_END,1)
Duel.RegisterEffect(e4,tp) Duel.RegisterEffect(e4,tp)
local e5=e4:Clone() local e5=e4:Clone()
e5:SetCode(EFFECT_SET_DEFENSE_FINAL) e5:SetCode(EFFECT_SET_DEFENSE_FINAL)
...@@ -76,6 +76,7 @@ function c74563021.cfilter(c) ...@@ -76,6 +76,7 @@ function c74563021.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x258) return c:IsFaceup() and c:IsSetCard(0x258)
end end
function c74563021.condition(e,tp,eg,ep,ev,re,r,rp) function c74563021.condition(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c74563021.cfilter,tp,LOCATION_MZONE,0,1,nil) return Duel.IsExistingMatchingCard(c74563021.cfilter,tp,LOCATION_MZONE,0,1,nil)
end end
function c74563021.atktg(e,c) function c74563021.atktg(e,c)
......
...@@ -16,20 +16,15 @@ function c74563023.initial_effect(c) ...@@ -16,20 +16,15 @@ function c74563023.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(74563023,0)) e1:SetDescription(aux.Stringid(74563023,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,74563023) e1:SetCountLimit(1,74563023)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCost(c74563023.spcost1) e1:SetCost(c74563023.spcost1)
e1:SetTarget(c74563023.sptg1) e1:SetTarget(c74563023.sptg1)
e1:SetOperation(c74563023.spop1) e1:SetOperation(c74563023.spop1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
c74563023.hana_mat={
aux.FilterBoolFunction(Card.IsFusionSetCard,0x111),
aux.FilterBoolFunction(Card.IsFusionSetCard,0x811),
}
function c74563023.recon(e, c) function c74563023.recon(e, c)
return e:GetHandler():GetSummonType() == SUMMON_TYPE_FUSION return e:GetHandler():GetSummonType() == SUMMON_TYPE_FUSION
end end
...@@ -58,6 +53,7 @@ function c74563023.cfilter(c) ...@@ -58,6 +53,7 @@ function c74563023.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x177) and c:IsType(TYPE_SPELL) return c:IsFaceup() and c:IsSetCard(0x177) and c:IsType(TYPE_SPELL)
end end
function c74563023.condition(e,tp,eg,ep,ev,re,r,rp) function c74563023.condition(e,tp,eg,ep,ev,re,r,rp)
local tp=e:GetHandlerPlayer()
return Duel.IsExistingMatchingCard(c74563023.cfilter,tp,LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c74563023.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c74563023.atktg(e,c) function c74563023.atktg(e,c)
...@@ -69,8 +65,8 @@ end ...@@ -69,8 +65,8 @@ end
function c74563023.defval(e,c) function c74563023.defval(e,c)
return math.ceil(c:GetDefense()/2) return math.ceil(c:GetDefense()/2)
end end
function c74563023.drfilter(c) function c74563023.rfilter(c,e,tp,mc)
return c:IsType(TYPE_SPELL) and c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c74563023.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(c,mc)) return c:IsType(TYPE_SPELL) and c:IsFaceup() and Duel.IsExistingMatchingCard(c74563023.spfilter1,tp,LOCATION_EXTRA,0,1,nil,e,tp,Group.FromCards(c,mc)) and c:IsReleasable()
end end
function c74563023.spfilter1(c,e,tp,mg) function c74563023.spfilter1(c,e,tp,mg)
return c:IsType(TYPE_SYNCHRO) and (c:IsSetCard(0x111) or c:IsSetCard(0x811)) return c:IsType(TYPE_SYNCHRO) and (c:IsSetCard(0x111) or c:IsSetCard(0x811))
...@@ -78,11 +74,12 @@ function c74563023.spfilter1(c,e,tp,mg) ...@@ -78,11 +74,12 @@ function c74563023.spfilter1(c,e,tp,mg)
end end
function c74563023.spcost1(e,tp,eg,ep,ev,re,r,rp,chk) function c74563023.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
if chk==0 then return c:IsAbleToGraveAsCost() and Duel.IsExistingMatchingCard(c74563023.drfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end if chk==0 then return c:IsReleasable() and Duel.IsExistingMatchingCard(c74563023.rfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) end
local g=Duel.SelectMatchingCard(tp,c74563023.drfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c74563023.rfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp,c)
g:AddCard(c) g:AddCard(c)
Duel.SendtoGrave(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function c74563023.sptg1(e,tp,eg,ep,ev,re,r,rp,chk) function c74563023.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_SMATERIAL) end
......
--统领月兔之女神✿嫦娥
function c74563024.initial_effect(c)
--fusion material
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_FUSION_MATERIAL)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(c74563024.con1)
e1:SetOperation(c74563024.op1)
c:RegisterEffect(e1)
--summon success
local e31=Effect.CreateEffect(c)
e31:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e31:SetCode(EVENT_SPSUMMON_SUCCESS)
e31:SetCondition(c74563024.descon)
e31:SetOperation(c74563024.desop)
c:RegisterEffect(e31)
--Special Summon a Token
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_REMOVED)
e3:SetCost(c74563024.limcost)
e3:SetTarget(c74563024.tktg)
e3:SetOperation(c74563024.tkop)
c:RegisterEffect(e3)
end
c74563024.DescSetName=0x258
function c74563024.ffilter(c,fc)
return c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_DIVINE)
end
function c74563024.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_FUSION
end
function c74563024.desop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsAbleToRemove() then
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
local count=0
local g=e:GetHandler():GetMaterial()
local tc=g:GetFirst()
while tc do
if tc:IsAttribute(ATTRIBUTE_DIVINE) then
count=count+2
end
if tc:IsSetCard(0x258) then
count=count+1
end
tc=g:GetNext()
end
while count>0 do
Duel.RegisterFlagEffect(tp,74563024,0,0,1)
count=count-1
end
end
function c74563024.limcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_RETURN)
end
function c74563024.tktg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local counter1=Duel.GetFlagEffect(tp,74563024)
local counter2=Duel.GetFlagEffect(tp,74563025)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) and counter1-counter2>=0
end
Duel.RegisterFlagEffect(tp,74563025,0,0,1)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
end
function c74563024.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
if Duel.IsPlayerCanSpecialSummonMonster(tp,74563020,0,TYPES_TOKEN_MONSTER,0,0,1,RACE_AQUA,ATTRIBUTE_WATER) then
local token=Duel.CreateToken(tp,74563020)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
end
function c74563024.exfilter1(c,fc)
return c74563024.allfilter1(c,fc) and c:IsCode(74563024) and c:IsAbleToRemove()
end
function c74563024.allfilter1(c,fc)
return c:IsCanBeFusionMaterial(fc) and c:IsFusionType(TYPE_MONSTER)
and (c:IsFusionSetCard(0x258) or c:IsFusionAttribute(ATTRIBUTE_DIVINE))
end
--
function c74563024.CheckFusionFilter1(c,sg,tc)
local check1=0
local check2=0
return (check1==0 and (tc:IsFusionSetCard(0x258) or tc:IsFusionAttribute(ATTRIBUTE_DIVINE)))
or (check2==0 and (tc:IsFusionSetCard(0x258) or tc:IsFusionAttribute(ATTRIBUTE_DIVINE)))
end
function c74563024.CheckRecursive1(c,mg,sg,exg,tp,fc,chkf)
--if exg and exg:IsContains(c) then return false end
if sg:GetCount()>0 and not sg:IsExists(c74563024.CheckFusionFilter1,1,nil,sg,c) then return false end
sg:AddCard(c)
if Duel.GetLocationCountFromEx(tp,tp,sg,c)<0 then return false end
local res=false
if sg:GetCount()==2 then
res=(chkf==PLAYER_NONE or Duel.GetLocationCountFromEx(chkf,tp,sg,fc)>0)
if aux.FCheckAdditional and not aux.FCheckAdditional(tp,sg,fc) then res=false end
else
res=mg:IsExists(c74563024.CheckRecursive1,1,sg,mg,sg,exg,tp,fc,PLAYER_NONE)
end
sg:RemoveCard(c)
return res
end
--
function c74563024.con1(e,g,gc,chkfnf)
if g==nil then return true end
local sg=Group.CreateGroup()
local chkf=(chkfnf & 0xff)
local c=e:GetHandler()
local tp=c:GetControler()
local mg=g:Filter(c74563024.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563024.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
if gc then return c74563024.allfilter1(gc,c)
and c74563024.CheckRecursive1(gc,mg,sg,exg,tp,c,chkf) end
return mg:IsExists(c74563024.CheckRecursive1,1,sg,mg,sg,exg,tp,c,chkf)
end
--
function c74563024.op1(e,tp,eg,ep,ev,re,r,rp,gc,chkfnf)
local c=e:GetHandler()
local chkf=(chkfnf & 0xff)
local mg=eg:Filter(c74563024.allfilter1,nil,c)
local exg=Duel.GetMatchingGroup(c74563024.exfilter1,tp,LOCATION_GRAVE,0,mg,c)
mg:Merge(exg)
if gc then sg:AddCard(gc) end
local sg=Group.CreateGroup()
if gc then sg:AddCard(gc) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FMATERIAL)
local g=mg:FilterSelect(tp,c74563024.CheckRecursive1,2,#mg,sg,mg,sg,exg,tp,c,chkf)
sg:Merge(g)
Duel.SetFusionMaterial(sg)
end
c74563024.OriginalSetMaterial=Card.SetMaterial
function c74563024.SetMaterial(c,g)
c74563024.OriginalSetMaterial(c,g)
if not g then return end
local rg1=g:Filter(c74563024.rfilter,nil,1)
if rg1:GetCount()>0 then
g:Sub(rg1)
Duel.Remove(rg1,POS_FACEUP,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
Duel.SendtoGrave(g,REASON_FUSION+REASON_MATERIAL+REASON_EFFECT)
end
function c74563024.rfilter(c,l)
return c:IsLocation(LOCATION_GRAVE) and c:IsCode(74563024)
end
\ No newline at end of file
--天曜盾甲
function c74563031.initial_effect(c)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_IGNORE_BATTLE_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetValue(aux.imval1)
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:SetValue(c74563031.efilter)
c:RegisterEffect(e1)
--battle indestructable
local e12=Effect.CreateEffect(c)
e12:SetType(EFFECT_TYPE_SINGLE)
e12:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e12:SetValue(1)
c:RegisterEffect(e12)
--avoid damage
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetCode(EFFECT_CHANGE_DAMAGE)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(1,0)
e4:SetValue(c74563031.damval)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_NO_EFFECT_DAMAGE)
c:RegisterEffect(e5)
--half atk
local e41=Effect.CreateEffect(c)
e41:SetType(EFFECT_TYPE_FIELD)
e41:SetCode(EFFECT_SET_ATTACK_FINAL)
e41:SetRange(LOCATION_MZONE)
e41:SetProperty(EFFECT_FLAG_DELAY)
e41:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e41:SetTarget(c74563031.atktg)
e41:SetValue(c74563031.atkval)
c:RegisterEffect(e41)
local e51=e4:Clone()
e51:SetCode(EFFECT_SET_DEFENSE_FINAL)
e51:SetValue(c74563031.defval)
c:RegisterEffect(e51)
end
function c74563031.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
function c74563031.damval(e,re,val,r,rp,rc)
if bit.band(r,REASON_EFFECT)~=0 then return 0 end
return val
end
function c74563031.atktg(e,c)
return c~=e:GetHandler()
end
function c74563031.atkval(e,c)
return math.ceil(c:GetAttack()/2)
end
function c74563031.defval(e,c)
return math.ceil(c:GetDefense()/2)
end
\ No newline at end of file
--残缺的圣女·莉莫涅姆
function c74563032.initial_effect(c)
--link summon
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLinkRace,RACE_FAIRY+RACE_MACHINE),2,2,c74563032.lcheck)
c:EnableReviveLimit()
--to hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCountLimit(1,74563032+EFFECT_COUNT_CODE_DUEL)
e2:SetCondition(c74563032.thcon)
e2:SetTarget(c74563032.thtg)
e2:SetOperation(c74563032.thop)
c:RegisterEffect(e2)
--to grave
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetTarget(c74563032.damtg1)
e3:SetOperation(c74563032.damop)
c:RegisterEffect(e3)
end
function c74563032.matfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT)
end
function c74563032.lcheck(g,lc)
return g:IsExists(c74563032.matfilter,1,nil)
end
function c74563032.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
function c74563032.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
end
function c74563032.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_DESTROYED)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,74563033)
e2:SetCondition(c74563032.drcon)
e2:SetTarget(c74563032.damtg)
e2:SetOperation(c74563032.damop)
Duel.RegisterEffect(e2,tp)
e1=e2:Clone()
e1:SetCode(EVENT_REMOVE)
Duel.RegisterEffect(e1,tp)
e3=e2:Clone()
e3:SetCode(EVENT_RELEASE)
Duel.RegisterEffect(e3,tp)
end
function c74563032.cfilter(c,tp)
return (c:IsRace(RACE_MACHINE) or c:IsRace(RACE_FAIRY)) and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp)
end
function c74563032.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c74563032.cfilter,1,nil,tp)
end
function c74563032.filter(c)
return c:IsCode(74563033) and c:IsAbleToHand()
end
function c74563032.damtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(c74563032.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563032.damtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c74563032.damop(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563032.filter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
\ No newline at end of file
--莉莫涅姆的救赎
function c74563033.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_RECOVER)
e1:SetDescription(aux.Stringid(74563033,0))
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c74563033.tg)
e1:SetOperation(c74563033.op)
c:RegisterEffect(e1)
end
function c74563033.ctfilter(c,e,tp)
return c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsRace(RACE_MACHINE) or c:IsRace(RACE_FAIRY)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c74563033.schfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsRace(RACE_FAIRY) and c:IsLevelAbove(9) and c:IsAbleToHand()
end
function c74563033.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c74563033.ctfilter,tp,LOCATION_GRAVE+LOCATION_HAND,0,1,nil,e,tp)) or Duel.IsExistingMatchingCard(c74563033.schfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c74563033.op(e,tp,eg,ep,ev,re,r,rp)
local opt=0
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c74563033.ctfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c74563033.schfilter,tp,LOCATION_DECK,0,1,nil) then
opt=Duel.SelectOption(tp,aux.Stringid(74563033,1),aux.Stringid(74563033,2))+1
elseif Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(c74563033.ctfilter,tp,LOCATION_HAND,0,1,nil,e,tp) then opt=1
elseif Duel.IsExistingMatchingCard(c74563033.schfilter,tp,LOCATION_DECK,0,1,nil) then opt=2
end
if opt==1 then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c74563033.ctfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
if Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and g:GetFirst():GetPreviousLocation()==LOCATION_HAND then
local ct=g:GetFirst():GetLevel()
Duel.Recover(tp,ct*300,REASON_EFFECT)
end
end
elseif opt==2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c74563033.schfilter,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
end
\ No newline at end of file
...@@ -23,10 +23,12 @@ function c86379227.initial_effect(c) ...@@ -23,10 +23,12 @@ function c86379227.initial_effect(c)
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS) e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCountLimit(1,86379228) e1:SetCountLimit(1,86379228)
e1:SetCost(c86379227.scost)
e1:SetCondition(c86379227.scon) e1:SetCondition(c86379227.scon)
e1:SetTarget(c86379227.stg) e1:SetTarget(c86379227.stg)
e1:SetOperation(c86379227.sop) e1:SetOperation(c86379227.sop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--[[
--negate --negate
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379227,3)) e2:SetDescription(aux.Stringid(86379227,3))
...@@ -40,7 +42,7 @@ function c86379227.initial_effect(c) ...@@ -40,7 +42,7 @@ function c86379227.initial_effect(c)
e2:SetCost(c86379227.necost) e2:SetCost(c86379227.necost)
e2:SetTarget(c86379227.netg) e2:SetTarget(c86379227.netg)
e2:SetOperation(c86379227.neop) e2:SetOperation(c86379227.neop)
c:RegisterEffect(e2) c:RegisterEffect(e2)]]
--to grave --to grave
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379227,4)) e3:SetDescription(aux.Stringid(86379227,4))
...@@ -100,6 +102,15 @@ function c86379227.lkop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -100,6 +102,15 @@ function c86379227.lkop(e,tp,eg,ep,ev,re,r,rp,c)
c:RegisterEffect(e1,true) c:RegisterEffect(e1,true)
end end
-- --
function c86379227.rcfilter(c)
return c:IsReleasable() and bit.band(c:GetOriginalType(),TYPE_MONSTER)~=0
end
function c86379227.scost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379227.rcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectMatchingCard(tp,c86379227.rcfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c86379227.sconfilter(c) function c86379227.sconfilter(c)
return c:IsType(TYPE_SPELL) and c:IsFaceup() return c:IsType(TYPE_SPELL) and c:IsFaceup()
end end
...@@ -218,4 +229,12 @@ function c86379227.gop(e,tp,eg,ep,ev,re,r,rp) ...@@ -218,4 +229,12 @@ function c86379227.gop(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+0x1fc0000) e1:SetReset(RESET_EVENT+0x1fc0000)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS) e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--cannot remove
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_CANNOT_REMOVE)
e2:SetRange(LOCATION_SZONE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e2)
end end
...@@ -84,7 +84,7 @@ function c86379688.pop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,7 @@ function c86379688.pop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then if tc:IsLocation(LOCATION_HAND) and tc:IsType(TYPE_PENDULUM) and (Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1)) then
local pc1=tc:GetLeftScale() local pc1=tc:GetLeftScale()
local pc2=tc:GetRightScale() local pc2=tc:GetRightScale()
if Duel.IsExistingMatchingCard(c86379688.pfilter2,tp,LOCATION_HAND,0,1,nil,pc1,pc2) and Duel.SelectYesNo(tp,aux.Stringid(86379688,1)) then if Duel.IsExistingMatchingCard(c86379688.pfilter2,tp,LOCATION_HAND,0,1,nil,pc1,pc2) and Duel.SelectYesNo(tp,aux.Stringid(86379688,2)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELECT)
local p=Duel.SelectMatchingCard(tp,c86379688.pfilter2,tp,LOCATION_HAND,0,1,1,nil,pc1,pc2) local p=Duel.SelectMatchingCard(tp,c86379688.pfilter2,tp,LOCATION_HAND,0,1,1,nil,pc1,pc2)
......
...@@ -2,27 +2,57 @@ ...@@ -2,27 +2,57 @@
function c86379690.initial_effect(c) function c86379690.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_HANDES) e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,86379690+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,86379690)
e1:SetTarget(c86379690.target) e1:SetTarget(c86379690.target)
e1:SetOperation(c86379690.activate) e1:SetOperation(c86379690.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,86379691)
e2:SetCondition(c86379690.gcon)
e2:SetTarget(c86379690.gtg)
e2:SetOperation(c86379690.gop)
c:RegisterEffect(e2)
--
if not c86379690.global_check then
c86379690.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_BATTLED)
ge1:SetOperation(c86379690.checkop)
Duel.RegisterEffect(ge1,0)
end
end
--
function c86379690.checkop(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local at=Duel.GetAttackTarget()
if a:IsStatus(STATUS_BATTLE_DESTROYED) then
Duel.RegisterFlagEffect(a:GetControler(),86379690,RESET_PHASE+PHASE_END,0,1)
end
if at:IsStatus(STATUS_BATTLE_DESTROYED) then
Duel.RegisterFlagEffect(at:GetControler(),86379690,RESET_PHASE+PHASE_END,0,1)
end
end end
-- --
function c86379690.filter(c) function c86379690.filter(c)
return c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x208) and c:IsLevelBelow(4) and c:IsAbleToHand() return c:IsRace(RACE_WARRIOR) and c:IsSetCard(0x208) and c:IsLevelBelow(4) and c:IsAbleToHand()
end end
function c86379690.cfilter(c) function c86379690.cfilter(c)
local b1=c:IsFacedown() return c:IsRace(RACE_WARRIOR) and c:IsFaceup()
local b2=c:IsFaceup() and not c:IsRace(RACE_WARRIOR) end
return b1 or b2 function c86379690.ccfilter(c)
return not c:IsRace(RACE_WARRIOR) and c:IsFaceup()
end end
function c86379690.target(e,tp,eg,ep,ev,re,r,rp,chk) function c86379690.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c86379690.filter,tp,LOCATION_DECK,0,1,nil) if chk==0 then return Duel.IsExistingMatchingCard(c86379690.filter,tp,LOCATION_DECK,0,1,nil) and not Duel.IsExistingMatchingCard(c86379690.ccfilter,tp,LOCATION_MZONE,0,1,nil) end
and Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)>0
and not Duel.IsExistingMatchingCard(c86379690.cfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end end
function c86379690.activate(e,tp,eg,ep,ev,re,r,rp) function c86379690.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -31,7 +61,22 @@ function c86379690.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,7 +61,22 @@ function c86379690.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT) Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT,nil) local dg=Duel.SelectMatchingCard(tp,Card.IsDiscardable,tp,LOCATION_HAND,0,1,1,nil)
Duel.ShuffleHand(tp) Duel.SendtoGrave(dg,REASON_EFFECT+REASON_DISCARD)
end end
end end
--
function c86379690.gcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,86379690)>=2
end
function c86379690.gtg(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 c86379690.gop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
Duel.SelectOption(1-tp,aux.Stringid(86379690,0))
Duel.SendtoHand(e:GetHandler(),nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,e:GetHandler())
end
--绯色的天女✿永江衣玖
function c86379867.initial_effect(c)
--SpecialSummon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(86379867,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,86379867)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c86379867.target)
e1:SetOperation(c86379867.operation)
c:RegisterEffect(e1)
--battle
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(86379867,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetTarget(c86379867.target)
e2:SetOperation(c86379867.operation)
c:RegisterEffect(e2)
--equip
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(86379867,1))
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_DESTROY)
e3:SetCondition(c86379867.con)
e3:SetOperation(c86379867.op)
c:RegisterEffect(e3)
end
--
function c86379867.spfilter(c,e,tp)
return c:IsSetCard(0x190) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c86379867.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c86379867.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_EXTRA)
end
function c86379867.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c86379867.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
--
function c86379867.spfilter2(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c86379867.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()~=tp and bit.band(e:GetHandler():GetReason(),REASON_BATTLE)~=0 and e:GetHandler():GetEquipGroup():IsExists(c86379867.spfilter2,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function c86379867.op(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():GetEquipGroup():IsExists(c86379867.spfilter2,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(86379867,1)) then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local g=e:GetHandler():GetEquipGroup():Filter(c86379867.spfilter2,nil,e,tp)
while g:GetCount()>0 and ft>0 do
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil)
Duel.SpecialSummonStep(sg:GetFirst(),0,tp,tp,false,false,POS_FACEUP)
ft=ft-1
g:RemoveCard(sg:GetFirst())
end
Duel.SpecialSummonComplete()
end
end
...@@ -163,8 +163,8 @@ end ...@@ -163,8 +163,8 @@ end
-- --
function c86379873.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c86379873.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetFlagEffect(tp,86379871)*100 local dt=Duel.GetFlagEffect(tp,86379871)*100
if chk==0 then return Duel.CheckLPCost(tp,1500+dt) end if chk==0 then return Duel.CheckLPCost(tp,1000+dt) end
Duel.PayLPCost(tp,1500+dt) Duel.PayLPCost(tp,1000+dt)
end end
function c86379873.mcon(e,tp,eg,ep,ev,re,r,rp) function c86379873.mcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -127,8 +127,8 @@ end ...@@ -127,8 +127,8 @@ end
-- --
function c86379874.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c86379874.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetFlagEffect(tp,86379871)*100 local dt=Duel.GetFlagEffect(tp,86379871)*100
if chk==0 then return Duel.CheckLPCost(tp,1500+dt) end if chk==0 then return Duel.CheckLPCost(tp,1000+dt) end
Duel.PayLPCost(tp,1500+dt) Duel.PayLPCost(tp,1000+dt)
end end
function c86379874.mcon(e,tp,eg,ep,ev,re,r,rp) function c86379874.mcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -125,8 +125,8 @@ end ...@@ -125,8 +125,8 @@ end
-- --
function c86379875.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c86379875.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetFlagEffect(tp,86379871)*100 local dt=Duel.GetFlagEffect(tp,86379871)*100
if chk==0 then return Duel.CheckLPCost(tp,1500+dt) end if chk==0 then return Duel.CheckLPCost(tp,1000+dt) end
Duel.PayLPCost(tp,1500+dt) Duel.PayLPCost(tp,1000+dt)
end end
function c86379875.mcon(e,tp,eg,ep,ev,re,r,rp) function c86379875.mcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
...@@ -122,8 +122,8 @@ end ...@@ -122,8 +122,8 @@ end
-- --
function c86379876.mcost(e,tp,eg,ep,ev,re,r,rp,chk) function c86379876.mcost(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetFlagEffect(tp,86379871)*100 local dt=Duel.GetFlagEffect(tp,86379871)*100
if chk==0 then return Duel.CheckLPCost(tp,1500+dt) end if chk==0 then return Duel.CheckLPCost(tp,1000+dt) end
Duel.PayLPCost(tp,1500+dt) Duel.PayLPCost(tp,1000+dt)
end end
function c86379876.mcon(e,tp,eg,ep,ev,re,r,rp) function c86379876.mcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
......
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