Commit 63a37ef7 authored by Nemo Ma's avatar Nemo Ma

1019 wd

parent feffc8a3
......@@ -41,6 +41,23 @@
130002004 0
130002005 0
#WILD, I say WILD, WAHAHA
16300000 0
16300005 0
16310005 0
16310010 0
16310015 0
16310020 0
16310025 0
16310030 0
16310035 0
16310040 0
16310045 0
16310050 0
16310056 0
16310060 0
16310080 0
17337970 0
17338520 0
17337030 0
17337940 0
17337950 0
......
No preview for this file type
expansions/pics/17337970.jpg

53.1 KB | W: | H:

expansions/pics/17337970.jpg

41.5 KB | W: | H:

expansions/pics/17337970.jpg
expansions/pics/17337970.jpg
expansions/pics/17337970.jpg
expansions/pics/17337970.jpg
  • 2-up
  • Swipe
  • Onion skin
--驯兽师 玄羽
function c16300000.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,16300000)
e1:SetTarget(c16300000.target)
e1:SetOperation(c16300000.activate)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16300000,0))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetCountLimit(1,16300000+1)
e2:SetTarget(c16300000.eqtg)
e2:SetOperation(c16300000.eqop)
c:RegisterEffect(e2)
--SpecialSummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16300000,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetHintTiming(TIMING_BATTLE_PHASE)
e3:SetCondition(c16300000.condition2)
e3:SetTarget(c16300000.target2)
e3:SetOperation(c16300000.operation2)
c:RegisterEffect(e3)
--act in hand
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(16300000,2))
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e0:SetCondition(c16300000.handcon)
c:RegisterEffect(e0)
end
c16300000.has_text_type=TYPE_UNION
function c16300000.thfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c16300000.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16300000.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c16300000.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c16300000.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function c16300000.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3dc6)
and Duel.IsExistingMatchingCard(c16300000.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,nil,tp)
end
function c16300000.eqfilter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3dc6)
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16300000.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c16300000.cfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c16300000.cfilter,tp,LOCATION_MZONE,0,1,nil,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c16300000.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK)
end
function c16300000.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16300000.eqfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED+LOCATION_DECK,0,1,1,nil,tp)
local sc=g:GetFirst()
if not sc then return end
if not Duel.Equip(tp,sc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c16300000.eqlimit)
sc:RegisterEffect(e1)
end
end
function c16300000.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c16300000.condition2(e,tp,eg,ep,ev,re,r,rp)
return (Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE)
end
function c16300000.filter(c,e,tp)
return c:GetAttackAnnouncedCount()>0 and Duel.IsExistingMatchingCard(c16300000.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,c)
end
function c16300000.spfilter(c,e,tp,ec)
local op=c:GetOwner()
return c:IsHasEffect(EFFECT_UNION_STATUS) and c:GetEquipTarget()==ec
and Duel.GetLocationCount(op,LOCATION_MZONE)>0
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,op)
end
function c16300000.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c16300000.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c16300000.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,c16300000.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c16300000.operation2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local op=tc:GetOwner()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(op,LOCATION_MZONE)>0 then
local g=Duel.GetMatchingGroup(c16300000.spfilter,tp,LOCATION_SZONE,0,nil,e,tp,tc)
if Duel.SpecialSummon(g,0,tp,op,false,false,POS_FACEUP)>0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(tc:GetAttackAnnouncedCount())
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
end
function c16300000.hcfilter(c)
return c:IsFacedown() or not c:IsSetCard(0x3dc6)
end
function c16300000.handcon(e)
return not Duel.IsExistingMatchingCard(c16300000.hcfilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil)
end
\ No newline at end of file
--Legend-Arms 玄羽
function c16300005.initial_effect(c)
c:EnableReviveLimit()
--link summon
aux.AddLinkProcedure(c,c16300005.matfilter,1,1)
--extra material
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetCode(EFFECT_EXTRA_LINK_MATERIAL)
e0:SetRange(LOCATION_EXTRA)
e0:SetTargetRange(LOCATION_ONFIELD,0)
e0:SetValue(c16300005.matval)
c:RegisterEffect(e0)
local e00=Effect.CreateEffect(c)
e00:SetType(EFFECT_TYPE_SINGLE)
e00:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
e00:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e00:SetValue(1)
c:RegisterEffect(e00)
--search
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE+CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16300005)
e1:SetTarget(c16300005.tgtg)
e1:SetOperation(c16300005.tgop)
c:RegisterEffect(e1)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_SET_ATTACK)
e3:SetValue(c16300005.val)
c:RegisterEffect(e3)
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_EQUIP)
e33:SetCode(EFFECT_SET_DEFENSE)
e33:SetValue(c16300005.val)
c:RegisterEffect(e33)
end
function c16300005.matfilter(c)
return c:IsLinkSetCard(0x3dc6) and c:IsType(0x1) or c:IsCode(16300000)
end
function c16300005.matval(e,lc,mg,c,tp)
if e:GetHandler()~=lc then return false,nil end
return c:IsCode(16300000),true
end
function c16300005.val(e,c)
local ec=e:GetHandler():GetEquipTarget()
return math.max(ec:GetBaseAttack(),ec:GetBaseDefense())
end
function c16300005.matfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) or c:IsCode(16300000)
end
function c16300005.tgfilter(c,e,tp)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_MONSTER)
and (c:IsAbleToGrave() or c:IsAbleToRemove()
or c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0)
end
function c16300005.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16300005.tgfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c16300005.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ck=0
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c16300005.tgfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
local tc=g:GetFirst()
local b1=tc:IsAbleToGrave()
local b2=tc:IsAbleToRemove()
local b3=tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetMZoneCount(tp)>0
local op=aux.SelectFromOptions(tp,{b1,1191},{b2,1192},{b1,1152})
if op==1 then
if Duel.SendtoGrave(tc,REASON_EFFECT)>0 and tc:IsLocation(0x10) then ck=1 end
elseif op==2 then
if Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)>0 and tc:IsLocation(0x20) then ck=1 end
elseif op==3 then
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)>0 then ck=1 end
end
end
if ck>0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:CheckUniqueOnField(tp)
and Duel.IsExistingMatchingCard(c16300005.eqfilter,tp,LOCATION_MZONE,0,1,c)
and Duel.SelectYesNo(tp,aux.Stringid(16300005,0)) then
local ec=Duel.SelectMatchingCard(tp,c16300005.eqfilter,tp,LOCATION_MZONE,0,1,1,c):GetFirst()
if ec then
if not Duel.Equip(tp,c,ec) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16300005.eqlimit)
e1:SetLabelObject(ec)
c:RegisterEffect(e1)
end
end
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
e2:SetTarget(c16300005.splimit)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
function c16300005.eqfilter(c)
return c:IsFaceup() and c:IsSetCard(0x3dc6)
end
function c16300005.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c16300005.splimit(e,c)
return not c:IsRace(RACE_WARRIOR+RACE_DRAGON) and c:IsLocation(LOCATION_EXTRA)
end
\ No newline at end of file
--Legend-Arms 萨库托兽
function c16310005.initial_effect(c)
c16310005.EnableUnionAttribute(c,c16310005.unfilter)
--search
local e2=Effect.CreateEffect(c)
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,16310005)
e2:SetTarget(c16310005.thtg)
e2:SetOperation(c16310005.thop)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(1000)
c:RegisterEffect(e3)
end
function c16310005.thfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) and c:IsAbleToHand()
end
function c16310005.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16310005.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16310005.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16310005.thfilter),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
function c16310005.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310005.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310005.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310005.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310005.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 恪勤兽
function c16310010.initial_effect(c)
c16310010.EnableUnionAttribute(c,c16310010.unfilter)
--search
local e2=Effect.CreateEffect(c)
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,16310010)
e2:SetTarget(c16310010.thtg)
e2:SetOperation(c16310010.thop)
c:RegisterEffect(e2)
--Atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_DEFENSE)
e3:SetValue(1000)
c:RegisterEffect(e3)
end
function c16310010.thfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(0x6) and c:IsAbleToHand()
end
function c16310010.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16310010.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function c16310010.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16310010.thfilter),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
function c16310010.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310010.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310010.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310010.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310010.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 兹巴兽
function c16310015.initial_effect(c)
c16310015.EnableUnionAttribute(c,c16310015.unfilter)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16310015)
e2:SetTarget(c16310015.eqtg)
e2:SetOperation(c16310015.eqop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UNRELEASABLE_SUM)
e3:SetValue(1)
c:RegisterEffect(e3)
local e33=e3:Clone()
e33:SetCode(EFFECT_UNRELEASABLE_NONSUM)
c:RegisterEffect(e33)
end
function c16310015.eqfilter(c,tc,tp)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0x3dc6)
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16310015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.IsExistingMatchingCard(c16310015.eqfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,c,tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function c16310015.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16310015.eqfilter),tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,c,tp)
local sc=g:GetFirst()
if sc and Duel.Equip(tp,sc,c) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(c)
e1:SetValue(c16310015.eqlimit)
sc:RegisterEffect(e1)
end
end
end
function c16310015.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c16310015.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310015.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310015.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310015.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310015.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 路德兽
function c16310020.initial_effect(c)
c16310020.EnableUnionAttribute(c,c16310020.unfilter)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16310020)
e2:SetTarget(c16310020.sptg)
e2:SetOperation(c16310020.spop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--cannot be material
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_CANNOT_BE_FUSION_MATERIAL)
e3:SetValue(c16310020.splimit)
c:RegisterEffect(e3)
local e4=e3:Clone()
e4:SetCode(EFFECT_CANNOT_BE_SYNCHRO_MATERIAL)
c:RegisterEffect(e4)
local e5=e3:Clone()
e5:SetCode(EFFECT_CANNOT_BE_XYZ_MATERIAL)
c:RegisterEffect(e5)
local e6=e3:Clone()
e6:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e6)
end
function c16310020.spfilter(c,e,tp)
return c:IsSetCard(0x3dc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c16310020.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16310020.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function c16310020.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(c16310020.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if not tc then return end
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
local c=e:GetHandler()
if c:IsFacedown() or not c:IsRelateToEffect(e) or c:IsControler(1-tp)
or Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
if not Duel.Equip(tp,c,tc,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16310020.eqlimit)
e1:SetLabelObject(tc)
c:RegisterEffect(e1)
end
function c16310020.eqlimit(e,c)
return e:GetLabelObject()==c
end
function c16310020.splimit(e,c)
if not c then return false end
return not c:IsSetCard(0x3dc6)
end
function c16310020.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310020.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310020.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310020.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310020.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 兹巴伊戈兽
function c16310025.initial_effect(c)
c16310025.EnableUnionAttribute(c,c16310025.unfilter)
--reequip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,16310025)
e2:SetCost(c16310025.recost)
e2:SetTarget(c16310025.retg)
e2:SetOperation(c16310025.reop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_EXTRA_ATTACK)
e3:SetValue(1)
c:RegisterEffect(e3)
end
c16310025.has_text_type=TYPE_UNION
function c16310025.recost(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetHandler():GetEquipTarget()
e:SetLabelObject(tc)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c16310025.refilter(c,tc,tp,exclude_modern_count)
return aux.CheckUnionEquip(c,tc,exclude_modern_count) and c:CheckUnionTarget(tc) and c:IsType(TYPE_UNION)
and c:IsLevelBelow(5) and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c16310025.retg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local exct=aux.IsUnionState(e) and 1 or 0
return c:GetEquipTarget()
and Duel.IsExistingMatchingCard(c16310025.refilter,tp,LOCATION_DECK,0,1,nil,c:GetEquipTarget(),tp,exct)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,16310025,0,TYPE_EFFECT+TYPE_MONSTER,2300,0,5,RACE_WARRIOR,ATTRIBUTE_DARK)
end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
c:CreateEffectRelation(e)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,c,1,0,0)
end
function c16310025.reop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c16310025.refilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp,nil)
local ec=g:GetFirst()
if ec and Duel.Equip(tp,ec,tc) then
aux.SetUnionState(ec)
if e:GetHandler():IsRelateToChain() and e:GetHandler():IsLocation(LOCATION_GRAVE) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c16310025.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310025.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310025.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310025.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310025.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 提亚路德兽
function c16310030.initial_effect(c)
c16310030.EnableUnionAttribute(c,c16310030.unfilter)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,16310030)
e2:SetCost(c16310030.recost)
e2:SetTarget(c16310030.retg)
e2:SetOperation(c16310030.reop)
c:RegisterEffect(e2)
--damage conversion
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_REVERSE_DAMAGE)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetTargetRange(1,0)
e3:SetValue(c16310030.rev)
c:RegisterEffect(e3)
end
function c16310030.recost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToHandAsCost() end
Duel.SendtoHand(e:GetHandler(),nil,REASON_COST)
end
function c16310030.tgfilter(c,e,tp)
local exct=aux.IsUnionState(e) and 1 or 0
return c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp)
and Duel.IsExistingMatchingCard(c16310030.cfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,nil,c,tp,exct)
end
function c16310030.cfilter(c,ec,tp,exclude_modern_count)
return c:IsFaceupEx() and c:IsType(TYPE_UNION)
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec,exclude_modern_count)
end
function c16310030.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,16310030,0,TYPE_EFFECT+TYPE_MONSTER,0,2300,5,RACE_DRAGON,ATTRIBUTE_DARK)
and Duel.IsExistingMatchingCard(c16310030.tgfilter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.SetTargetCard(e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_REMOVED+LOCATION_GRAVE)
end
function c16310030.reop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,c16310030.tgfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c16310030.cfilter,tp,LOCATION_REMOVED+LOCATION_GRAVE,0,1,1,nil,tc,tp)
local ec=sg:GetFirst()
if ec and Duel.Equip(tp,ec,tc) then
aux.SetUnionState(ec)
if e:GetHandler():IsRelateToChain() and e:GetHandler():IsLocation(LOCATION_HAND) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
end
function c16310030.rev(e,re,r,rp,rc)
local c=e:GetHandler()
local ec=c:GetEquipTarget()
return bit.band(r,REASON_BATTLE)~=0
and ec and (ec==Duel.GetAttacker() or ec==Duel.GetAttackTarget())
end
function c16310030.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310030.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetCondition(c16310030.mpcon)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetCondition(c16310030.mpcon)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
function c16310030.mpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
\ No newline at end of file
--Legend-Arms 杜兰兽
function c16310035.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16310035.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--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(c16310035.fsplimit)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(c16310035.val)
c:RegisterEffect(e1)
--pierce
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e11)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetCountLimit(1,16310035)
e2:SetTarget(c16310035.target)
e2:SetOperation(c16310035.activate)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCondition(c16310035.eqecon)
c:RegisterEffect(e3)
local e33=e11:Clone()
e33:SetType(EFFECT_TYPE_EQUIP)
e33:SetCondition(c16310035.eqecon)
c:RegisterEffect(e33)
end
function c16310035.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3dc6) and c:IsDefense(0) and c:IsType(0x1)
and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function c16310035.fsplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c16310035.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil,0x6)*500
end
function c16310035.desfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP)
end
function c16310035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.IsExistingTarget(c16310035.desfilter,tp,LOCATION_ONFIELD,0,1,nil)
and Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,2,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g1=Duel.SelectTarget(tp,c16310035.desfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g2=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,2,2,nil)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g1,g1:GetCount(),0,0)
end
function c16310035.activate(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.Destroy(sg,REASON_EFFECT)
end
function c16310035.eqecon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x3dc6)
end
\ No newline at end of file
--Legend-Arms 雷神路德兽
function c16310040.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16310040.ffilter,2,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--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(c16310040.fsplimit)
c:RegisterEffect(e0)
--atk up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetValue(c16310040.val)
c:RegisterEffect(e1)
--defense attack
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_SINGLE)
e11:SetCode(EFFECT_DEFENSE_ATTACK)
e11:SetValue(1)
c:RegisterEffect(e11)
--negate
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_NEGATE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,16310040)
e2:SetCondition(c16310040.discon)
e2:SetCost(c16310040.discost)
e2:SetTarget(c16310040.distg)
e2:SetOperation(c16310040.disop)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCondition(c16310040.eqecon)
c:RegisterEffect(e3)
local e33=e11:Clone()
e33:SetType(EFFECT_TYPE_EQUIP)
e33:SetCondition(c16310040.eqecon)
c:RegisterEffect(e33)
end
function c16310040.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3dc6) and c:IsAttack(0) and c:IsType(0x1)
and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function c16310040.fsplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c16310040.val(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil,0x6)*500
end
function c16310040.discon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
function c16310040.costfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c16310040.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16310040.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16310040.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c16310040.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 c16310040.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
end
function c16310040.eqecon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
return ec and ec:IsSetCard(0x3dc6)
end
\ No newline at end of file
--Legend-Arms 杜兰达兽
function c16310045.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16310045.ffilter,3,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--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(c16310045.fsplimit)
c:RegisterEffect(e0)
--actlimit
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:SetTargetRange(0,1)
e1:SetValue(1)
e1:SetCondition(c16310045.actcon)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,16310045)
e2:SetTarget(c16310045.eqtg)
e2:SetOperation(c16310045.eqop)
c:RegisterEffect(e2)
--lock
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16310045,1))
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_BATTLE_START)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c16310045.lzcon)
e3:SetTarget(c16310045.lztg)
e3:SetOperation(c16310045.lzop)
c:RegisterEffect(e3)
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e33:SetRange(LOCATION_SZONE)
e33:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e33:SetTarget(c16310045.eftg)
e33:SetLabelObject(e3)
c:RegisterEffect(e33)
end
function c16310045.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3dc6) and c:IsDefense(0) and c:IsType(0x1)
and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function c16310045.fsplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c16310045.cfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3dc6) and c:IsControler(tp)
end
function c16310045.actcon(e)
local tp=e:GetHandlerPlayer()
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
return (a and c16310045.cfilter(a,tp)) or (d and c16310045.cfilter(d,tp))
end
function c16310045.eqfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16310045.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c16310045.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c16310045.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c16310045.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16310045.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16310045.eqlimit)
tc:RegisterEffect(e1)
--atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetTarget(c16310045.atkfilter)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(800)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
--pierce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_PIERCE)
e3:SetTarget(c16310045.atkfilter)
e3:SetTargetRange(LOCATION_MZONE,0)
e3:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e3,tp)
end
end
function c16310045.atkfilter(e,c)
return c:IsSetCard(0x3dc6) and c:GetEquipGroup():GetCount()>0
end
function c16310045.eqlimit(e,c)
return e:GetOwner()==c
end
function c16310045.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsCode(16310055) and c:GetEquipGroup():IsContains(e:GetHandler())
end
function c16310045.lzcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsCode(16310055)
end
function c16310045.eqcfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup() and c:IsSetCard(0x3dc6)
end
function c16310045.lztg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c16310045.eqcfilter,tp,LOCATION_SZONE,0,nil)
if chk==0 then return #g>0 end
end
function c16310045.lzop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16310045.eqcfilter,tp,LOCATION_SZONE,0,nil)
if #g<1 then return end
local zone=0
local tc=g:GetFirst()
while tc do
zone=zone|(tc:GetColumnZone(LOCATION_ONFIELD)&0xffff0000)
tc=g:GetNext()
end
if tp==1 then
zone=((zone&0xffff)<<16)|((zone>>16)&0xffff)
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_DISABLE_FIELD)
e1:SetValue(zone)
e1:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e1,tp)
end
\ No newline at end of file
--Legend-Arms 布利维路德龙兽
function c16310050.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,c16310050.ffilter,3,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_MZONE+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST+REASON_MATERIAL)
--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(c16310050.fsplimit)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DEFENSE_ATTACK)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,0)
e1:SetTarget(c16310050.atktg)
e1:SetValue(1)
c:RegisterEffect(e1)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,16310050)
e2:SetTarget(c16310050.eqtg)
e2:SetOperation(c16310050.eqop)
c:RegisterEffect(e2)
--lock
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EFFECT_CANNOT_ACTIVATE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,1)
e3:SetCondition(c16310050.lzcon)
e3:SetValue(1)
c:RegisterEffect(e3)
local e33=Effect.CreateEffect(c)
e33:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e33:SetRange(LOCATION_SZONE)
e33:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e33:SetTarget(c16310050.eftg)
e33:SetLabelObject(e3)
c:RegisterEffect(e33)
end
function c16310050.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x3dc6) and c:IsAttack(0) and c:IsType(0x1)
and (not sg or not sg:IsExists(Card.IsFusionCode,1,c,c:GetFusionCode()))
end
function c16310050.fsplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c16310050.atktg(e,c)
return c:IsSetCard(0x3dc6)
end
function c16310050.eqfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:IsFaceupEx()
end
function c16310050.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c16310050.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c16310050.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c16310050.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16310050.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if not Duel.Equip(tp,tc,c,false) then return end
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16310050.eqlimit)
tc:RegisterEffect(e1)
--immune
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_IMMUNE_EFFECT)
e2:SetTarget(c16310050.atkfilter)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetValue(c16310050.efilter)
e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp)
end
end
function c16310050.atkfilter(e,c)
return c:IsSetCard(0x3dc6) and c:GetEquipGroup():GetCount()>0
end
function c16310050.efilter(e,te)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer()
end
function c16310050.eqlimit(e,c)
return e:GetOwner()==c
end
function c16310050.eftg(e,c)
return c:IsType(TYPE_MONSTER) and c:IsCode(16310055) and c:GetEquipGroup():IsContains(e:GetHandler())
end
function c16310050.lzcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return e:GetHandler():IsCode(16310055)
and (ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE)
end
\ No newline at end of file
--Legend-Arms 诸神之主兽
function c16310055.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcCode2(c,16310045,16310050,true,true)
aux.AddContactFusionProcedure(c,c16310055.cfilter,LOCATION_ONFIELD+LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
--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(c16310055.fsplimit)
c:RegisterEffect(e0)
if not c16310055.global_flag then
c16310055.global_flag=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_SPSUMMON_SUCCESS)
ge1:SetOperation(c16310055.regop)
Duel.RegisterEffect(ge1,0)
end
--equip
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetTarget(c16310055.target)
e1:SetOperation(c16310055.operation)
c:RegisterEffect(e1)
--multi attack
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_EXTRA_ATTACK)
e2:SetValue(c16310055.atkval)
c:RegisterEffect(e2)
--negate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16310055,1))
e3:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,16310055)
e3:SetCondition(c16310055.negcon)
e3:SetCost(c16310055.negcost)
e3:SetTarget(aux.nbtg)
e3:SetOperation(c16310055.negop)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(16310055,2))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetHintTiming(0,TIMING_BATTLE_END)
e4:SetCountLimit(1,16310055+1)
e4:SetCondition(c16310055.spcon)
e4:SetTarget(c16310055.sptg)
e4:SetOperation(c16310055.spop)
c:RegisterEffect(e4)
end
function c16310055.regop(e,tp,eg,ep,ev,re,r,rp)
for tc in aux.Next(eg) do
if tc:IsCode(16310045) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),16310055,0,0,0)
elseif tc:IsCode(16310050) then
Duel.RegisterFlagEffect(tc:GetSummonPlayer(),16310055+1,0,0,0)
end
end
end
function c16310055.cfilter(c,fc)
local tp=fc:GetControler()
return c:IsFusionCode(16310045,16310050) and c:IsAbleToRemoveAsCost() and Duel.GetFlagEffect(tp,16310055)>0 and Duel.GetFlagEffect(tp,16310055+1)>0
end
function c16310055.fsplimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function c16310055.eqfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_MONSTER) and not c:IsForbidden() and c:IsFaceupEx()
and (c:IsAttack(0) or c:IsDefense(0))
end
function c16310055.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return false end
return Duel.IsExistingMatchingCard(c16310055.eqfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,nil,1,tp,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,0)
end
function c16310055.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToChain() then return end
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<=0 then return end
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(c16310055.eqfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
if ft>g:GetCount() then ft=g:GetCount() end
if ft==0 then return end
local sg=g:Select(tp,ft,ft,nil)
local tc=sg:GetFirst()
while tc do
if Duel.Equip(tp,tc,c,false) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16310055.eqlimit)
tc:RegisterEffect(e1)
end
tc=sg:GetNext()
end
end
function c16310055.eqlimit(e,c)
return e:GetOwner()==c
end
function c16310055.atkval(e,c)
return e:GetHandler():GetEquipCount()-1
end
function c16310055.negcon(e,tp,eg,ep,ev,re,r,rp)
if ep==tp or e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) then return false end
return Duel.IsChainNegatable(ev)
end
function c16310055.negfilter(c)
return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP) and c:IsAbleToGraveAsCost()
end
function c16310055.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c16310055.negfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c16310055.negfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c16310055.negop(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
function c16310055.spcon(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase()
return ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE
end
function c16310055.spfilter(c,e,tp)
return c:GetEquipTarget()==e:GetHandler() and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and c:IsSetCard(0x3dc6)
end
function c16310055.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c16310055.spfilter,tp,LOCATION_SZONE,0,1,nil,e,tp,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_SZONE)
end
function c16310055.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c16310055.spfilter,tp,LOCATION_SZONE,0,1,1,nil,e,tp,c)
local tc=g:GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local fid=c:GetFieldID()
c:RegisterFlagEffect(16310055,RESET_EVENT+RESETS_STANDARD,0,1,fid)
tc:RegisterFlagEffect(16310055,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetCountLimit(1)
e1:SetLabel(fid)
e1:SetLabelObject(tc)
e1:SetCondition(c16310055.eqcon1(c))
e1:SetOperation(c16310055.eqop1(c))
Duel.RegisterEffect(e1,tp)
end
end
function c16310055.eqcon1(mc)
return
function (e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if mc:GetFlagEffectLabel(16310055)~=e:GetLabel() or tc:GetFlagEffectLabel(16310055)~=e:GetLabel() then
e:Reset()
return false
else return true end
end
end
function c16310055.eqop1(mc)
return
function (e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not Duel.Equip(tp,tc,mc) then return end
local e1=Effect.CreateEffect(mc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetValue(c16310055.eqlimit1)
e1:SetLabelObject(mc)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end
function c16310055.eqlimit1(e,c)
return e:GetLabelObject()==c
end
\ No newline at end of file
--Legend-Arms 直达撞击者
function c16310060.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_REMOVE+CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,16310060)
e1:SetCondition(c16310060.condition)
e1:SetTarget(aux.nbtg)
e1:SetOperation(c16310060.activate)
c:RegisterEffect(e1)
--destroy replace
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,16310060)
e2:SetTarget(c16310060.reptg)
e2:SetValue(c16310060.repval)
e2:SetOperation(c16310060.repop)
c:RegisterEffect(e2)
end
function c16310060.cfilter(c)
return c:IsFaceup() and (c:IsAttack(0) or c:IsDefense(0))
end
function c16310060.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c16310060.cfilter,tp,LOCATION_MZONE,0,1,nil)
and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c16310060.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=re:GetHandler()
if Duel.NegateActivation(ev) and tc:IsRelateToEffect(re) and Duel.Remove(eg,POS_FACEUP,REASON_EFFECT)~=0
and tc:IsLocation(LOCATION_REMOVED) and not tc:IsReason(REASON_REDIRECT) then
local g1=Duel.GetMatchingGroup(c16310060.filter1,tp,LOCATION_REMOVED,0,nil)
local g2=Duel.GetMatchingGroup(c16310060.filter2,tp,LOCATION_REMOVED,0,nil)
if g1:GetCount()>0 and g2:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(16310060,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg1=g1:Select(tp,1,1,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg2=g2:Select(tp,1,1,nil)
sg1:Merge(sg2)
Duel.BreakEffect()
Duel.SendtoGrave(sg1,REASON_EFFECT+REASON_RETURN)
end
end
end
function c16310060.filter1(c)
return c:IsSetCard(0x3dc6) and c:IsAttack(0) and c:IsAbleToGrave() and c:IsFaceup()
end
function c16310060.filter2(c)
return c:IsSetCard(0x3dc6) and c:IsDefense(0) and c:IsAbleToGrave() and c:IsFaceup()
end
function c16310060.repfilter(c,tp)
return c:IsFaceup() and c:IsSetCard(0x3dc6) and c:IsLocation(LOCATION_MZONE)
and c:IsControler(tp) and c:IsReason(REASON_EFFECT+REASON_BATTLE) and not c:IsReason(REASON_REPLACE)
end
function c16310060.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemove() and eg:IsExists(c16310060.repfilter,1,nil,tp) end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96)
end
function c16310060.repval(e,c)
return c16310060.repfilter(c,e:GetHandlerPlayer())
end
function c16310060.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_EFFECT)
end
\ No newline at end of file
--Legend-Arms 传世的救灭神装
function c16310065.initial_effect(c)
--activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--atk limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SELECT_BATTLE_TARGET)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0,LOCATION_MZONE)
e1:SetCondition(c16310065.con)
e1:SetValue(c16310065.tg)
c:RegisterEffect(e1)
--cannot be target
local e11=Effect.CreateEffect(c)
e11:SetType(EFFECT_TYPE_FIELD)
e11:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e11:SetRange(LOCATION_SZONE)
e11:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e11:SetTargetRange(LOCATION_MZONE,0)
e11:SetCondition(c16310065.con)
e11:SetTarget(c16310065.tg)
e11:SetValue(aux.tgoval)
c:RegisterEffect(e11)
--to hand
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_SZONE)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCountLimit(1,16310065)
e2:SetTarget(c16310065.tgtg)
e2:SetOperation(c16310065.tgop)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_DESTROYED)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,16310065+1)
e3:SetCondition(c16310065.thcon)
e3:SetTarget(c16310065.thtg)
e3:SetOperation(c16310065.thop)
c:RegisterEffect(e3)
end
function c16310065.filter(c)
return c:IsFaceup() and c:IsAttack(0)
end
function c16310065.con(e)
return Duel.IsExistingMatchingCard(c16310065.filter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
function c16310065.tg(e,c)
return c:IsFaceup() and c:IsDefense(0)
end
function c16310065.tgfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) and c:IsAbleToGrave() and c:IsFaceup()
and c:IsLevelBelow(11)
end
function c16310065.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c16310065.tgfilter,tp,LOCATION_REMOVED,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
end
function c16310065.check(g)
return g:GetSum(Card.GetLevel)<=11
end
function c16310065.tgop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c16310065.tgfilter,tp,LOCATION_REMOVED,0,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
aux.GCheckAdditional=c16310065.check
local sg=g:SelectSubGroup(tp,aux.TRUE,false,1,11)
aux.GCheckAdditional=nil
if sg and sg:GetCount()>0 then
Duel.SendtoGrave(sg,nil,REASON_EFFECT+REASON_RETURN)
end
end
function c16310065.sfilter(c,tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
and c:IsPreviousSetCard(0x3dc6)
and c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsPreviousLocation(LOCATION_MZONE)
end
function c16310065.thcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c16310065.sfilter,1,nil,tp) and not eg:IsContains(e:GetHandler())
end
function c16310065.thfilter(c)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) and c:IsFaceupEx() and c:IsAbleToHand()
end
function c16310065.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c16310065.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16310065.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c16310065.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c16310065.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
\ No newline at end of file
--Legend-Arms 剑盾共斗
function c16310070.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--extra summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16310070,0))
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_EXTRA_SUMMON_COUNT)
e1:SetRange(LOCATION_FZONE)
e1:SetTargetRange(LOCATION_HAND+LOCATION_MZONE,0)
e1:SetTarget(aux.TargetBoolFunction(Card.IsType,TYPE_UNION))
c:RegisterEffect(e1)
--SpecialSummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16310070,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_FZONE)
e2:SetCountLimit(1,16310070)
e2:SetTarget(c16310070.target)
e2:SetOperation(c16310070.activate)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16310070,2))
e3:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_FZONE)
e3:SetCountLimit(1,16310070+1)
e3:SetTarget(c16310070.target2)
e3:SetOperation(c16310070.activate2)
c:RegisterEffect(e3)
end
function c16310070.spfilter(c,e,tp)
return c:IsSetCard(0x3dc6) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and (c:GetAttack()==0 or c:GetDefense()==0)
and Duel.IsExistingMatchingCard(c16310070.eqfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,tp,c)
end
function c16310070.eqfilter(c,tp,ec)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) and (c:GetAttack()==0 or c:GetDefense()==0)
and (c:GetAttack()==ec:GetDefense() or c:GetDefense()==ec:GetAttack())
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
end
function c16310070.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16310070.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16310070.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16310070.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp):GetFirst()
if tc and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c16310070.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp,tc) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local eqg=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c16310070.eqfilter),tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp,tc)
local eqc=eqg:GetFirst()
if Duel.Equip(tp,eqc,tc) then
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetLabelObject(tc)
e1:SetValue(c16310070.eqlimit)
eqc:RegisterEffect(e1)
end
end
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetTarget(c16310070.splimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function c16310070.splimit(e,c)
return not c:IsRace(RACE_DRAGON+RACE_WARRIOR) and c:IsLocation(LOCATION_EXTRA)
end
function c16310070.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c16310070.filter0(c)
return c:IsOnField() and c:IsAbleToRemove()
end
function c16310070.filter1(c,e)
return c:IsOnField() and c:IsAbleToRemove() and not c:IsImmuneToEffect(e)
end
function c16310070.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3dc6) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c16310070.filter3(c)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove()
end
function c16310070.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c16310070.filter0,nil)
local mg2=Duel.GetMatchingGroup(c16310070.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local res=Duel.IsExistingMatchingCard(c16310070.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16310070.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_ONFIELD+LOCATION_GRAVE)
end
function c16310070.activate2(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(c16310070.filter1,nil,e)
local mg2=Duel.GetMatchingGroup(c16310070.filter3,tp,LOCATION_GRAVE,0,nil)
mg1:Merge(mg2)
local sg1=Duel.GetMatchingGroup(c16310070.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16310070.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat1=Duel.SelectFusionMaterial(tp,tc,mg1,nil,chkf)
tc:SetMaterial(mat1)
Duel.Remove(mat1,POS_FACEUP,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
\ No newline at end of file
--Legend-Arms 剑盾共战
function c16310075.initial_effect(c)
--Activate
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
--equip
local custom_code=aux.RegisterMergedDelayedEvent_ToSingleCard(c,16310075,{EVENT_SUMMON_SUCCESS,EVENT_SPSUMMON_SUCCESS})
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(16310075,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(custom_code)
e1:SetRange(LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,16310075)
e1:SetTarget(c16310075.eqtg)
e1:SetOperation(c16310075.eqop)
c:RegisterEffect(e1)
--fusion
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(16310075,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON+CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,16310075+1)
e2:SetTarget(c16310075.target)
e2:SetOperation(c16310075.activate)
c:RegisterEffect(e2)
--Activate
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(16310075,2))
e3:SetCategory(CATEGORY_TOEXTRA+CATEGORY_TOHAND)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_SZONE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCountLimit(1,16310075+2)
e3:SetTarget(c16310075.target2)
e3:SetOperation(c16310075.activate2)
c:RegisterEffect(e3)
end
function c16310075.tgfilter(c,e,tp,chk)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_UNION)
and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsControler(tp) and c:IsCanBeEffectTarget(e)
and (chk or Duel.IsExistingMatchingCard(c16310075.cfilter,tp,LOCATION_DECK,0,1,nil,c,tp))
end
function c16310075.cfilter(c,ec,tp)
return c:IsSetCard(0x3dc6) and c:IsType(TYPE_UNION) and not c:IsCode(ec:GetCode())
and c:CheckUniqueOnField(tp) and not c:IsForbidden() and c:CheckUnionTarget(ec) and aux.CheckUnionEquip(c,ec)
end
function c16310075.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c16310075.tgfilter(chkc,e,tp,true) end
local g=eg:Filter(c16310075.tgfilter,nil,e,tp,false)
if chk==0 then return g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
if g:GetCount()==1 then
Duel.SetTargetCard(g:GetFirst())
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=g:Select(tp,1,1,nil)
Duel.SetTargetCard(tc)
end
end
function c16310075.eqop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=Duel.SelectMatchingCard(tp,c16310075.cfilter,tp,LOCATION_DECK,0,1,1,nil,tc,tp)
local ec=sg:GetFirst()
if ec and Duel.Equip(tp,ec,tc) then
aux.SetUnionState(ec)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
ec:RegisterEffect(e1)
end
end
end
function c16310075.filter0(c)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
end
function c16310075.filter1(c,e)
return c:IsFaceupEx() and c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToDeck()
and not c:IsImmuneToEffect(e)
end
function c16310075.filter2(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and c:IsSetCard(0x3dc6) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
end
function c16310075.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local chkf=tp
local mg=Duel.GetMatchingGroup(c16310075.filter0,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
local res=Duel.IsExistingMatchingCard(c16310075.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg,nil,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c16310075.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg3,mf,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16310075.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp
local mg=Duel.GetMatchingGroup(c16310075.filter1,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,nil,e)
local sg1=Duel.GetMatchingGroup(c16310075.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg,nil,chkf)
local mg3=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg3=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c16310075.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg3,mf,chkf)
end
if sg1:GetCount()>0 or (sg2~=nil and sg2:GetCount()>0) then
local sg=sg1:Clone()
if sg2 then sg:Merge(sg2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:Select(tp,1,1,nil)
local tc=tg:GetFirst()
if sg1:IsContains(tc) and (sg2==nil or not sg2:IsContains(tc) or not Duel.SelectYesNo(tp,ce:GetDescription())) then
local mat=Duel.SelectFusionMaterial(tp,tc,mg,nil,chkf)
tc:SetMaterial(mat)
Duel.HintSelection(mat)
Duel.SendtoDeck(mat,nil,SEQ_DECKSHUFFLE,REASON_EFFECT+REASON_MATERIAL+REASON_FUSION)
Duel.BreakEffect()
Duel.SpecialSummon(tc,SUMMON_TYPE_FUSION,tp,tp,false,false,POS_FACEUP)
else
local mat2=Duel.SelectFusionMaterial(tp,tc,mg3,nil,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c16310075.filter(c,e,tp)
return c:IsFaceupEx() and c:IsSetCard(0x3dc6) and c:IsType(TYPE_FUSION) and c:IsAbleToExtra()
and Duel.IsExistingMatchingCard(c16310075.mgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,c,e,tp,c)
end
function c16310075.mgfilter(c,e,tp,fc)
return c:IsFaceupEx() and c:IsSetCard(0x3dc6) and c:IsAbleToHand() and c:IsType(0x1)
and (c:GetAttack()==fc:GetAttack() or c:GetDefense()==fc:GetDefense())
end
function c16310075.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) and chkc:IsControler(tp) and c16310075.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c16310075.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,c16310075.filter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_TOEXTRA,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c16310075.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c16310075.mgfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,tc,e,tp,tc)
if Duel.SendtoDeck(tc,nil,SEQ_DECKTOP,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_EXTRA) and #g>0 then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,2,nil)
Duel.SendtoHand(sg,nil,0x40)
end
end
\ No newline at end of file
--Legend-Arms 斯巴达兽
function c16310080.initial_effect(c)
c16310080.EnableUnionAttribute(c,c16310080.unfilter)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP+CATEGORY_HANDES)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,16310080)
e2:SetTarget(c16310080.eqtg)
e2:SetOperation(c16310080.eqop)
c:RegisterEffect(e2)
local e22=e2:Clone()
e22:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e22)
--draw
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DRAW)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e3:SetCode(EVENT_ATTACK_ANNOUNCE)
e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,16310080+1)
e3:SetCondition(c16310080.drcon)
e3:SetTarget(c16310080.drtg)
e3:SetOperation(c16310080.drop)
c:RegisterEffect(e3)
end
function c16310080.eqfilter(c,ec)
return c:IsSetCard(0x3dc6) and c:IsType(0x1) and not c:IsForbidden()
end
function c16310080.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)>0
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c16310080.eqfilter,tp,LOCATION_DECK,0,1,nil,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function c16310080.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)==0 then return end
if Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and c:IsFaceup()
and c:IsRelateToEffect(e) and c:IsLocation(LOCATION_MZONE) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c16310080.eqfilter,tp,LOCATION_DECK,0,1,1,nil,c)
if g:GetCount()>0 then
Duel.Equip(tp,g:GetFirst(),c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c16310080.eqlimit)
e1:SetLabelObject(c)
g:GetFirst():RegisterEffect(e1)
end
end
end
function c16310080.eqlimit(e,c)
return c==e:GetLabelObject()
end
function c16310080.drcon(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetEquipTarget()
return Duel.GetAttacker()==tc or Duel.GetAttackTarget()==tc
end
function c16310080.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function c16310080.drop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
function c16310080.unfilter(c)
return c:IsSetCard(0x3dc6)
end
function c16310080.EnableUnionAttribute(c,filter)
local equip_limit=Auxiliary.UnionEquipLimit(filter)
--destroy sub
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e1:SetValue(Auxiliary.UnionReplaceFilter)
c:RegisterEffect(e1)
--limit
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_UNION_LIMIT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(equip_limit)
c:RegisterEffect(e2)
--equip
local equip_filter=Auxiliary.UnionEquipFilter(filter)
local e3=Effect.CreateEffect(c)
e3:SetDescription(1068)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_EQUIP)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_MZONE)
e3:SetHintTiming(0,TIMING_MAIN_END)
e3:SetTarget(Auxiliary.UnionEquipTarget(equip_filter))
e3:SetOperation(Auxiliary.UnionEquipOperation(equip_filter))
c:RegisterEffect(e3)
--unequip
local e4=Effect.CreateEffect(c)
e4:SetDescription(1152)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_SZONE)
e4:SetHintTiming(0,TIMING_MAIN_END)
e4:SetTarget(Auxiliary.UnionUnequipTarget)
e4:SetOperation(Auxiliary.UnionUnequipOperation)
c:RegisterEffect(e4)
end
\ No newline at end of file
--·欧德·拉格纳·
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337760)
aux.AddCodeList(c,17337760,17337920)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(1190)
......
......@@ -3,11 +3,31 @@ local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337920)
--
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,0))
e6:SetType(EFFECT_TYPE_IGNITION)
e6:SetRange(LOCATION_DECK+LOCATION_GRAVE)
e6:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e6:SetCondition(s.con2)
e6:SetCountLimit(1,id)
e6:SetTarget(s.settg)
e6:SetOperation(s.setop)
c:RegisterEffect(e6)
--
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_ACTIVATE)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetCondition(s.con)
c:RegisterEffect(e5)
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
e0:SetDescription(1190)
e0:SetCategory(CATEGORY_TOHAND)
e0:SetType(EFFECT_TYPE_IGNITION)
e0:SetRange(LOCATION_SZONE)
e0:SetCondition(s.con)
e0:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e0:SetCountLimit(1,id+o)
e0:SetTarget(s.acttg)
e0:SetOperation(s.actop)
c:RegisterEffect(e0)
--
......@@ -35,15 +55,28 @@ function s.initial_effect(c)
e4:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e4)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and not c:IsForbidden() and c:CheckUniqueOnField(tp) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then Duel.MoveToField(c,tp,tp,LOCATION_SZONE,POS_FACEUP,true) end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0
end
function s.thfilter(c)
return (c:IsCode(17337920) or aux.IsCodeListed(c,17337920)) and c:IsAbleToHand() and not c:IsCode(id)
end
function s.acttg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.actop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil)
if #g>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
if #sg>0 then
......@@ -52,12 +85,12 @@ function s.actop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.reinfilter(c,tp)
return c:IsFaceup() and c:IsCode(17337920) and c:IsControler(tp)
function s.reinfilter(c)
return c:IsFaceup() and c:IsCode(17337920)
end
function s.con2(e)
local tp=e:GetHandlerPlayer()
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(s.reinfilter,tp,LOCATION_MZONE,0,1,nil,tp)
return Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)==0 and Duel.IsExistingMatchingCard(s.reinfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.atklimit(e,c)
return c:IsFaceup() and c:IsCode(17337920)
......
--莎缇拉 嫉妒魔女
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,17337870,17337400)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.spcon)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--spsummon condition
local e2=Effect.CreateEffect(c)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CANNOT_DISABLE_SPSUMMON)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
c:RegisterEffect(e3)
--win
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e4:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_SPSUMMON_SUCCESS)
e4:SetOperation(s.winop)
c:RegisterEffect(e4)
--
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_COUNTER)
e5:SetType(EFFECT_TYPE_IGNITION)
e5:SetRange(LOCATION_HAND)
e5:SetCountLimit(1,id)
e5:SetCondition(s.actcon_ign)
e5:SetCost(s.cost)
e5:SetTarget(s.tg)
e5:SetOperation(s.op)
c:RegisterEffect(e5)
local e6=e5:Clone()
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e6:SetCondition(s.actcon_quick)
c:RegisterEffect(e6)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsCanRemoveCounter(tp,1,0,0x9f50,10,REASON_COST) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
end
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.RemoveCounter(c:GetControler(),1,0,0x9f50,10,REASON_COST)
end
function s.winop(e,tp,eg,ep,ev,re,r,rp)
local WIN_REASON_SATELLA=0x9f5e
local p=e:GetHandler():GetSummonPlayer()
Duel.Win(p,WIN_REASON_SATELLA)
end
function s.actcon_ign(e,tp)
local lp1,lp2=Duel.GetLP(tp),Duel.GetLP(1-tp)
return math.abs(lp1-lp2)<7000
end
function s.actcon_quick(e,tp)
local lp1,lp2=Duel.GetLP(tp),Duel.GetLP(1-tp)
return math.abs(lp1-lp2)>=7000
end
function s.relfilter(c,tp)
return c:IsType(TYPE_MONSTER) and (c:IsCode(17337870,17337400) or aux.IsCodeListed(c,17337870) or aux.IsCodeListed(c,17337400))
and Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,c)
end
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.CheckReleaseGroupEx(tp,s.relfilter,1,REASON_COST,true,nil,tp) and not c:IsPublic() end
Duel.ConfirmCards(1-tp,c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PUBLIC)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local g=Duel.SelectReleaseGroupEx(tp,s.relfilter,1,1,REASON_COST,true,nil,tp)
Duel.Release(g,REASON_COST)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsSetCard(0x5f52,0x5f50) and c:IsCanAddCounter(0x9f50,1)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_MZONE,0,1,nil) end
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_COUNTER)
local g=Duel.SelectMatchingCard(tp,s.ctfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst()
if tc then
tc:AddCounter(0x9f50,1)
end
end
\ No newline at end of file
......@@ -1450,6 +1450,7 @@
#玄羽 163 0xdc0-0xdcf
!setname 0xdc3 X抗体
!setname 0xdc4 阿尔法兽
!setname 0x3dc6 Legend-Arms
#岸彼斐子 173 0xf50-0xf51
!setname 0x3f50 EMT阵营
......
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