Commit 7d5209c4 authored by root's avatar root

Refresh on 2025-05-17 18:14:22

parent 2b2d2560
......@@ -92,6 +92,9 @@
101301004 1
62880279 1 --怒怒怒怒战士
31425736 1 --小奶油蛋糕杯
101301022 1
93156774 1 --圣丽苏
27420823 1 --K917
33760966 1 --巨蟹摩羯
28642461 1 --霜精
30741503 1 --伽拉忒亚
......
......@@ -16,7 +16,7 @@ function c10105580.initial_effect(c)
e2:SetOperation(c10105580.spreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10105580,0))
e3:SetDescription(aux.Stringid(10105580,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e3:SetRange(LOCATION_REMOVED)
......@@ -27,15 +27,14 @@ function c10105580.initial_effect(c)
e3:SetOperation(c10105580.spop2)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--search
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10105580,0))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e4:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetTarget(c10105580.tg)
e4:SetOperation(c10105580.op)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e4:SetTarget(c10105580.thtg)
e4:SetOperation(c10105580.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
......@@ -81,17 +80,18 @@ function c10105580.spop2(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c10105580.filter(c)
return c:IsSetCard(0x7cca) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
function c10105580.thfilter(c)
return c:IsSetCard(0x7cca) and not c:IsCode(10105580) and c:IsAbleToHand()
end
function c10105580.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105580.filter,tp,LOCATION_DECK,0,1,nil) end
function c10105580.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105580.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c10105580.op(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstMatchingCard(c10105580.filter,tp,LOCATION_DECK,0,nil)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
function c10105580.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c10105580.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
\ No newline at end of file
......@@ -36,7 +36,7 @@ function c10105581.initial_effect(c)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,c10105581)
e4:SetCountLimit(1)
e4:SetCost(c10105581.discost)
e4:SetTarget(c10105581.distg)
e4:SetOperation(c10105581.disop)
......@@ -83,36 +83,54 @@ function c10105581.spop2(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
function c10105581.costfilter(c)
return c:IsSetCard(0x7cca) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost()
-- COST:从手卡/场上除外永劫龙灾怪兽
function c10105581.costfilter(c,tp)
return c:IsSetCard(0x7cca)
and c:IsType(TYPE_MONSTER)
and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and c:IsAbleToRemoveAsCost()
end
function c10105581.discost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c10105581.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10105581.costfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
if chk==0 then
return Duel.IsExistingMatchingCard(c10105581.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c10105581.costfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,1,nil,tp)
if #g>0 then
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
end
-- TARGET:选择场上其他效果怪兽
function c10105581.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.NegateEffectMonsterFilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
Duel.SelectTarget(tp,aux.NegateEffectMonsterFilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,e:GetHandler())
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsType(TYPE_EFFECT) and chkc~=c end
if chk==0 then
return Duel.IsExistingTarget(Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,1,c,TYPE_EFFECT)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISABLE)
local g=Duel.SelectTarget(tp,Card.IsType,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,c,TYPE_EFFECT)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
-- OPERATION:无效效果
function c10105581.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) and tc:IsFaceup() and not tc:IsDisabled() then
Duel.NegateRelatedChain(tc,RESET_TURN_SET)
-- 无效效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
-- 无效效果影响
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
end
end
\ No newline at end of file
......@@ -5,24 +5,22 @@ function c10105585.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,10105585)
e1:SetCountLimit(1,10105585)
e1:SetCost(c10105585.spcost)
e1:SetTarget(c10105585.sptg)
e1:SetOperation(c10105585.spop)
c:RegisterEffect(e1)
--tohand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105585,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCondition(aux.exccon)
e2:SetCountLimit(1,10105585)
e2:SetCost(c10105585.thcost)
e2:SetTarget(c10105585.target1)
e2:SetOperation(c10105585.activate1)
c:RegisterEffect(e2)
-- ②效果:从墓地回收除外怪兽
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105585,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,10105585+1) -- 独立编号限制
e2:SetCost(c10105585.thcost)
e2:SetTarget(c10105585.thtg)
e2:SetOperation(c10105585.thop)
c:RegisterEffect(e2)
end
function c10105585.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
......@@ -50,19 +48,26 @@ function c10105585.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c10105585.filter0(c,e,tp)
return c:IsType(TYPE_MONSTER) and c:IsLevel(12) and c:IsSetCard(0x7cca) and c:IsAbleToHand() and c:IsFaceup()
-- ②效果筛选:除外的12星永劫龙灾
function c10105585.thfilter(c)
return c:IsSetCard(0x7cca)
and c:IsLevel(12)
and c:IsAbleToHand()
and c:IsFaceup()
end
function c10105585.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c10105585.filter0(chkc) end
if chk==0 then return Duel.IsExistingTarget(c10105585.filter0,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10105585.filter0,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
-- ②效果处理
function c10105585.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(c10105585.thfilter,tp,LOCATION_REMOVED,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10105585.thfilter,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c10105585.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
function c10105585.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
\ No newline at end of file
function c10105586.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,nil,12,3)
aux.AddXyzProcedure(c,nil,12,2)
c:EnableReviveLimit()
--battle
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e1:SetValue(1)
c:RegisterEffect(e1)
--material
--material
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105586,0))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
......
function c10105587.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_ACTIVATE)
e0:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e0)
-- 效果①:场上的永劫龙灾抗性
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) -- 影响全场的效果
e1:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) -- 不会被对方效果破坏
e1:SetRange(LOCATION_FZONE) -- 此卡在场上时生效
e1:SetTargetRange(LOCATION_MZONE,0) -- 控制我方场上怪兽
e1:SetTarget(c10105587.tgtg)
e1:SetValue(aux.tgoval)
c:RegisterEffect(e1)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105587,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1)
e1:SetRange(LOCATION_FZONE)
e1:SetTarget(c10105587.target)
e1:SetOperation(c10105587.operation)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(10105587,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1,10105587)
e2:SetRange(LOCATION_FZONE)
e2:SetTarget(c10105587.target)
e2:SetOperation(c10105587.operation)
c:RegisterEffect(e2)
-- ③效果:特殊召唤成功时回收卡
local e3=Effect.CreateEffect(c) -- 修改为 e3
e3:SetCategory(CATEGORY_TODECK)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(c10105587.tdcon)
e3:SetTarget(c10105587.tdtg)
e3:SetOperation(c10105587.tdop)
c:RegisterEffect(e3) -- 注册 e3
end
-- 抗性目标筛选
function c10105587.tgtg(e,c)
return c:IsSetCard(0x7cca) and c:IsFaceup() -- 字段匹配且表侧表示
end
function c10105587.filter(c,e,sp)
return c:IsSetCard(0x7cca) and c:IsCanBeSpecialSummoned(e,0,sp,false,false)
......@@ -30,4 +54,34 @@ function c10105587.operation(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
-- 条件检查:特殊召唤的是7cca字段怪兽
function c10105587.cfilter(c)
return c:IsSetCard(0x7cca) and c:IsType(TYPE_MONSTER)
end
function c10105587.tdcon(e,tp,eg)
return eg:IsExists(c10105587.cfilter,1,nil)
end
-- 目标选择:双方墓地/除外的卡
function c10105587.tdtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectTarget(tp,Card.IsAbleToDeck,tp,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,1,0,0)
end
-- 效果处理:返回对应卡组
function c10105587.tdop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
local dest=0
-- 判断是否是额外卡组怪兽
if tc:IsType(TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK) then
dest=0 -- 额外卡组
else
dest=1 -- 主卡组
end
Duel.SendtoDeck(tc,nil,dest,REASON_EFFECT)
end
end
\ No newline at end of file
......@@ -4,10 +4,22 @@ function c10105588.initial_effect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCountLimit(1,10105588)
e1:SetCondition(c10105588.condition)
e1:SetTarget(c10105588.target)
e1:SetOperation(c10105588.activate)
c:RegisterEffect(e1)
-- ②效果:攻击宣言时从墓地发动
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE) -- 对方攻击宣言时
e2:SetRange(LOCATION_GRAVE) -- 在墓地发动
e2:SetCountLimit(1,101055880)
e2:SetCost(aux.bfgcost) -- 自身除外作为cost
e2:SetTarget(c10105588.sptg)
e2:SetOperation(c10105588.spop)
c:RegisterEffect(e2)
end
function c10105588.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x7cca)
......@@ -28,4 +40,32 @@ function c10105588.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
-- 修正后的筛选函数(添加 e,tp 参数)
function c10105588.spfilter(c,e,tp)
return c:GetLevel()==12
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
-- 修正后的目标选择
function c10105588.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c10105588.spfilter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10105588.spfilter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
if #g>0 then
Duel.SetTargetCard(g:GetFirst())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
end
-- 效果处理:特殊召唤
function c10105588.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
function c10105590.initial_effect(c)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,aux.FilterBoolFunction(Card.IsLevel,12),1)
--tohand
--tohand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10105590,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
......@@ -13,7 +13,19 @@ function c10105590.initial_effect(c)
e1:SetTarget(c10105590.thtg1)
e1:SetOperation(c10105590.thop1)
c:RegisterEffect(e1)
end
-- 快速效果(对方效果发动时连锁)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,101055900)
e2:SetCondition(c10105590.condition)
e2:SetCost(c10105590.cost)
e2:SetTarget(c10105590.target)
e2:SetOperation(c10105590.activate)
c:RegisterEffect(e2)
end
function c10105590.thcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_LINK)
end
......@@ -31,4 +43,36 @@ function c10105590.thop1(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
-- 条件:对方发动效果时
function c10105590.condition(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandlerPlayer()==1-tp
end
-- 代价:自身除外
function c10105590.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c,POS_FACEUP,REASON_COST)
end
-- 目标筛选
function c10105590.filter(c)
return c:IsSetCard(0x7cca) and c:IsLevel(12) and c:IsFaceup()
end
function c10105590.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(c10105590.filter,tp,LOCATION_REMOVED,0,1,nil)
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_REMOVED)
end
-- 特殊召唤操作
function c10105590.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c10105590.filter,tp,LOCATION_REMOVED,0,1,1,nil)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
function c10111188.initial_effect(c)
aux.EnablePendulumAttribute(c)
--fusion (m)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_FUSION_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_PZONE)
e1:SetCountLimit(1)
e1:SetTarget(c10111188.mftg)
e1:SetOperation(c10111188.mfop)
c:RegisterEffect(e1)
--fusion substitute
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_FUSION_SUBSTITUTE)
e2:SetCondition(c10111188.subcon)
c:RegisterEffect(e2)
--move
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_BE_MATERIAL)
e3:SetCountLimit(1,10111188)
e3:SetCondition(c10111188.pencon)
e3:SetTarget(c10111188.pentg)
e3:SetOperation(c10111188.penop)
c:RegisterEffect(e3)
end
function c10111188.mffilter0(c,e)
return c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
end
function c10111188.mffilter1(c,e)
return c:IsOnField() and not c:IsImmuneToEffect(e)
end
function c10111188.mffilter2(c,e,tp,m,f,gc,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c))
and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,gc,chkf)
end
function c10111188.mftg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then
local chkf=tp
local mg1=Duel.GetFusionMaterial(tp):Filter(Card.IsOnField,nil)
mg1:Merge(Duel.GetMatchingGroup(c10111188.mffilter0,tp,LOCATION_PZONE,0,nil,e))
local res=Duel.IsExistingMatchingCard(c10111188.mffilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,c,chkf)
if not res then
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
local mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
res=Duel.IsExistingMatchingCard(c10111188.mffilter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg2,mf,c,chkf)
end
end
return res
end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c10111188.mfop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local chkf=tp
if not c:IsRelateToEffect(e) or c:IsImmuneToEffect(e) then return end
local mg1=Duel.GetFusionMaterial(tp):Filter(c10111188.mffilter1,nil,e)
mg1:Merge(Duel.GetMatchingGroup(c10111188.mffilter0,tp,LOCATION_PZONE,0,nil,e))
local sg1=Duel.GetMatchingGroup(c10111188.mffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,c,chkf)
local mg2=nil
local sg2=nil
local ce=Duel.GetChainMaterial(tp)
if ce~=nil then
local fgroup=ce:GetTarget()
mg2=fgroup(ce,e,tp)
local mf=ce:GetValue()
sg2=Duel.GetMatchingGroup(c10111188.mffilter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg2,mf,c,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,c,chkf)
tc:SetMaterial(mat1)
Duel.SendtoGrave(mat1,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,mg2,c,chkf)
local fop=ce:GetOperation()
fop(ce,e,tp,tc,mat2)
end
tc:CompleteProcedure()
end
end
function c10111188.subcon(e)
return e:GetHandler():IsLocation(LOCATION_PZONE+LOCATION_MZONE)
end
function c10111188.pencon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsLocation(LOCATION_EXTRA) and c:IsFaceup() and r==REASON_FUSION
end
function c10111188.pentg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLocation(tp,LOCATION_PZONE,0) or Duel.CheckLocation(tp,LOCATION_PZONE,1) end
end
function c10111188.penop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.MoveToField(c,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
\ No newline at end of file
function c10111191.initial_effect(c)
--summon with 1 tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(10111191,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c10111191.otcon)
e1:SetOperation(c10111191.otop)
e1:SetValue(SUMMON_TYPE_ADVANCE)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e2)
--tribute summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(10111191,1))
e3:SetCategory(CATEGORY_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,10111191)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e3:SetCondition(c10111191.sumcon)
e3:SetTarget(c10111191.sumtg)
e3:SetOperation(c10111191.sumop)
c:RegisterEffect(e3)
-- 召唤成功时效果
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(10111191,0))
e4:SetCategory(CATEGORY_REMOVE+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_SUMMON_SUCCESS)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetTarget(c10111191.tg)
e4:SetOperation(c10111191.op)
c:RegisterEffect(e4)
-- 素材检查效果
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_MATERIAL_CHECK)
e5:SetValue(c10111191.valcheck)
e5:SetLabelObject(e4)
c:RegisterEffect(e5)
end
function c10111191.rfilter(c,tp)
return c:IsRace(RACE_DINOSAUR) and (c:IsControler(tp) or c:IsFaceup())
end
function c10111191.otcon(e,c,minc)
if c==nil then return true end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c10111191.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
end
function c10111191.otop(e,tp,eg,ep,ev,re,r,rp,c)
local mg=Duel.GetMatchingGroup(c10111191.rfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c10111191.cfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsFaceup()
end
function c10111191.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c10111191.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function c10111191.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function c10111191.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
-- 素材检查
function c10111191.valcheck(e,c)
local g=c:GetMaterial() -- 正确获取解放素材的方式
if g:IsExists(Card.IsSetCard,1,nil,0x1185) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
-- 目标选择
function c10111191.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,nil)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_GRAVE,1,1,nil)
if #g>0 then
e:SetLabelObject(g:GetFirst())
if e:GetLabel()==1 then
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
else
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
end
end
-- 效果处理
function c10111191.op(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject()
if not tc or not tc:IsLocation(LOCATION_GRAVE) then return end
local replace=(e:GetLabel()==1)
if replace then
if Duel.SendtoHand(tc,tp,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
end
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--tribute summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_HAND)
e2:SetCountLimit(1,id+100)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCondition(s.sumcon)
e2:SetTarget(s.sumtg)
e2:SetOperation(s.sumop)
c:RegisterEffect(e2)
-- 召唤成功时效果
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
c:RegisterEffect(e3)
-- 素材检查效果
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetCode(EFFECT_MATERIAL_CHECK)
e4:SetValue(s.valcheck)
e4:SetLabelObject(e3)
c:RegisterEffect(e4)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function s.filter(c)
return c:IsSetCard(0x185) and not c:IsCode(10111192) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
function s.cfilter(c)
return c:IsRace(RACE_DINOSAUR) and c:IsFaceup()
end
function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSummonable(true,nil,1) or c:IsMSetable(true,nil,1) end
Duel.SetOperationInfo(0,CATEGORY_SUMMON,c,1,0,0)
end
function s.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
local pos=0
if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENSE end
if pos==0 then return end
if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
Duel.Summon(tp,c,true,nil,1)
else
Duel.MSet(tp,c,true,nil,1)
end
end
-- 素材检查
function s.valcheck(e,c)
local g=c:GetMaterial()
if g:IsExists(Card.IsSetCard,1,nil,0x1185) then
e:GetLabelObject():SetLabel(1)
else
e:GetLabelObject():SetLabel(0)
end
end
-- 目标选择
function s.destg(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
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,0,0,0)
end
-- ③效果修复版
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,2,nil)
if #g>0 then
local dg=Duel.Destroy(g,REASON_EFFECT)
if dg>0 and e:GetLabel()==1 then
s.lock_effect(e,tp,g)
end
end
end
-- 修复后的封锁效果处理
function s.lock_effect(e,tp,g)
-- 存储被破坏卡的原始代码
local codes={}
for tc in aux.Next(g) do
table.insert(codes,tc:GetOriginalCodeRule())
end
-- 序列化存储到效果标签
local code_str=table.concat(codes,",")
-- 禁止发动效果
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(0,1)
e1:SetValue(function(e,re,tp)
return s.actfilter(e,re,tp,code_str)
end)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
-- 修复后的激活限制条件
function s.actfilter(e,re,tp,code_str)
local rc=re:GetHandler()
local codes={}
for code in string.gmatch(code_str,"([^,]+)") do
table.insert(codes,tonumber(code))
end
return rc:IsOriginalCodeRule(table.unpack(codes))
and re:IsActiveType(TYPE_MONSTER+TYPE_SPELL+TYPE_TRAP)
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
--race
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetCode(EFFECT_ADD_RACE)
e0:SetValue(RACE_WARRIOR)
e0:SetCondition(function(e)
return e:GetHandler():IsLocation(LOCATION_MZONE) end)
c:RegisterEffect(e0)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
c:RegisterEffect(e1)
--search
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+100)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
Duel.AddCustomActivityCounter(id,ACTIVITY_CHAIN,s.chainfilter)
end
function s.chainfilter(re,tp,cid)
local loc=Duel.GetChainInfo(cid,CHAININFO_TRIGGERING_LOCATION)
return not (re:IsActiveType(TYPE_MONSTER) and loc&(LOCATION_HAND|LOCATION_GRAVE)>0)
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCustomActivityCount(id,1-tp,ACTIVITY_CHAIN)>0 and Duel.IsMainPhase()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToChain() then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
-- 自肃效果
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(s.aclimit)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
function s.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER)
and not re:GetHandler():IsRace(RACE_DINOSAUR) -- 修正点
end
function s.thfilter(c)
return c:IsSetCard(0x1185) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
\ No newline at end of file
......@@ -47,7 +47,6 @@ end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToHand()
and Duel.GetMZoneCount(tp,c)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
and Duel.GetFlagEffect(tp,id)==0 end
Duel.RegisterFlagEffect(tp,id,RESET_CHAIN,0,1)
......
......@@ -49,7 +49,7 @@ function s.splimit(e,se,sp,st)
return se:GetHandler():IsSetCard(0x195)
end
function s.cfilter(c,tp,rp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp) and c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousSetCard(0x195) and (c:IsReason(REASON_BATTLE) or (rp==1-tp and c:IsReason(REASON_EFFECT)))
end
function s.spcon2(e,tp,eg,ep,ev,re,r,rp)
......
--林之忍者-碧理
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--fusion summon
aux.AddFusionProcFunRep(c,s.ffilter,3,true)
aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsReleasable,REASON_SPSUMMON),LOCATION_MZONE,0,Duel.Release,REASON_SPSUMMON+REASON_MATERIAL)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_OATH)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--change pos
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,EFFECT_COUNT_CODE_OATH)
e4:SetCost(s.poscost)
e4:SetTarget(s.postg)
e4:SetOperation(s.posop)
c:RegisterEffect(e4)
end
function s.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x2b) and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
--林之忍者-碧理
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
--fusion summon
aux.AddFusionProcFunRep(c,s.ffilter,3,true)
aux.AddContactFusionProcedure(c,aux.FilterBoolFunction(Card.IsReleasable,REASON_SPSUMMON),LOCATION_MZONE,0,Duel.Release,REASON_SPSUMMON+REASON_MATERIAL)
--splimit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetValue(s.splimit)
c:RegisterEffect(e1)
--disable
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_DISABLE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.distg)
e2:SetOperation(s.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--change pos
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_POSITION)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetRange(LOCATION_MZONE)
e4:SetCost(s.poscost)
e4:SetTarget(s.postg)
e4:SetOperation(s.posop)
c:RegisterEffect(e4)
end
function s.ffilter(c,fc,sub,mg,sg)
return c:IsFusionSetCard(0x2b) and (not sg or not sg:IsExists(Card.IsRace,1,c,c:GetRace()))
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA) or aux.fuslimit(e,se,sp,st)
end
function s.disfilter(c)
return c:IsFaceup() and aux.NegateEffectMonsterFilter(c)
end
end
function s.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.disfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.disfilter,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -97,7 +97,7 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Release(e:GetHandler(),REASON_EFFECT)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x107a) and not c:IsType(TYPE_LINK) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsSetCard(0x107a) and not c:IsType(TYPE_LINK+TYPE_XYZ) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(5) and c:IsAttribute(ATTRIBUTE_DARK+ATTRIBUTE_LIGHT)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.spfilter(chkc,e,tp) end
......
......@@ -43,12 +43,15 @@ function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_HAND,0,1,1,e:GetHandler())
Duel.SendtoGrave(g,REASON_COST+REASON_DISCARD)
end
function s.tfilter(c)
return c:IsAbleToChangeControler() and c:IsCanBeEffectTarget() and c:IsType(TYPE_MONSTER)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and chkc:IsAbleToChangeControler() end
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and chkc:IsControler(1-tp) and s.tfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
and Duel.IsExistingTarget(s.tfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,nil) and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsAbleToChangeControler,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
local g=Duel.SelectTarget(tp,s.tfilter,tp,0,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -102,12 +102,12 @@ function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function s.sttg1(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,0,LOCATION_GRAVE,1,nil)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_GRAVE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
local op=aux.SelectFromOptions(tp,
{b1,aux.Stringid(id,0)},
......
......@@ -70,7 +70,7 @@ end
function s.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local tc=Duel.SelectMatchingCard(tp,s.tgfilter,tp,LOCATION_DECK,0,1,1,nil):GetFirst()
if tc:GetCount()>0 and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
if tc and tc:IsAbleToHand() and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
......
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,76263644)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......@@ -30,14 +31,14 @@ function s.cfilter(c,e,tp,ft)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,lv,e,tp)
end
function s.spfilter(c,lv,e,tp)
return c:IsLevelBelow(lv) and c:IsSetCard(0x2b) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
return c:IsLevelBelow(lv) and c:IsSetCard(0xc008) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if chkc then return chkc:IsControler(tp) and s.cfilter(chkc) end
if chk==0 then return ft>-1 and Duel.IsExistingTarget(s.cfilter,tp,LOCATION_MZONE,0,1,nil,e,tp,ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,0,1,1,nil)
local g=Duel.SelectTarget(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,e,tp,ft)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
......@@ -50,27 +51,26 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local sg=Duel.GetMatchingGroup(s.spfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,slv,e,tp)
if not sg:GetCount()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectSubGroup(tp,s.gselect,false,1,ft,slv)
for tc in aux.Next(tg) do
Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.spfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,nil,lv,e,tp)
if sg:GetCount()==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tg=sg:SelectSubGroup(tp,s.gselect,false,1,ft,lv)
for ag in aux.Next(tg) do
Duel.SpecialSummonStep(ag,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ag:RegisterEffect(e1)
end
Duel.SpecialSummonComplete()
Duel.BreakEffect()
Duel.Destroy(tc,REASON_EFFECT)
end
function s.tdfilter(c)
return c:IsFaceup() and c:IsAbleToDeck() and (c:IsCode(76263644) or c:IsSetCard(0x8)) and c:IsType(TYPE_MONSTER)
return c:IsFaceup() and c:IsAbleToDeck() and (c:IsCode(76263644) or c:IsSetCard(0xc008)) and c:IsType(TYPE_MONSTER)
end
function s.rfilter(c)
return c:IsFaceup() and (c:IsCode(76263644) or c:IsSetCard(0xc008) and c:IsLevelAbove(8))
......
......@@ -36,11 +36,8 @@ end
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsType(TYPE_FUSION)
end
function s.filter(c)
return not c:IsRace(RACE_ROCK)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
end
function s.filter0(c,e)
return c:IsFaceup() and c:IsCanBeFusionMaterial() and not c:IsImmuneToEffect(e)
......
......@@ -35,6 +35,7 @@ function s.initial_effect(c)
e5:SetCode(EFFECT_IMMUNE_EFFECT)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_MZONE,0)
e5:SetCondition(s.con)
e5:SetTarget(s.indtg)
e5:SetValue(s.efilter)
c:RegisterEffect(e5)
......@@ -80,7 +81,10 @@ function s.splimit(e,c)
return not (c:IsSetCard(0x18) or c:IsRace(RACE_SPELLCASTER+RACE_AQUA))
end
function s.indtg(e,c)
return c:IsSetCard(0x18) and c:IsPosition(POS_FACEUP_ATTACK)
return c:IsSetCard(0x18) and c:IsPosition(POS_FACEUP_ATTACK) and c:IsSummonType(SUMMON_TYPE_NORMAL)
end
function s.con(e)
return Duel.GetTurnPlayer()==e:GetHandlerPlayer()
end
function s.efilter(e,re)
return e:GetHandlerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
......@@ -98,7 +102,7 @@ function s.sumcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.cfilter,1,nil,tp)
end
function s.sumfilter(c)
return c:IsSetCard(0x18) and c:IsSummonable(true,nil) and c:IsAttackBelow(1000)
return c:IsSetCard(0x18) and c:IsSummonable(true,nil)
end
function s.sumtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.sumfilter,tp,LOCATION_HAND+LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,LOCATION_MZONE,0,1,nil,0x1019,1) end
......
......@@ -6,7 +6,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,m)
e1:SetCost(cm.cost)
e1:SetCondition(cm.ccon)
......
......@@ -32,9 +32,10 @@ function cm.initial_effect(c)
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
for tc in aux.Next(eg) do
if tc:IsControler(1-tp) and tc:IsType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(tp,m,RESET_PHASE+PHASE_END,0,1)
if tc:IsType(TYPE_MONSTER) then
Duel.RegisterFlagEffect(tc:GetControler(),m,RESET_PHASE+PHASE_END,0,1)
end
end
end
......@@ -51,7 +52,7 @@ function cm.f(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsType(TYPE_MONSTER)
end
function cm.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFlagEffect(tp,m)>=1
return Duel.GetFlagEffect(1-tp,m)>=1
end
function cm.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_GRAVE) and cm.f(chkc,e,tp) end
......
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,76263644)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DRAW+CATEGORY_REMOVE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
......@@ -2,20 +2,29 @@
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
-- local e1=Effect.CreateEffect(c)
-- e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
-- e1:SetType(EFFECT_TYPE_ACTIVATE)
-- e1:SetCode(EVENT_FREE_CHAIN)
-- e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
-- e1:SetHintTiming(0,TIMING_END_PHASE)
-- e1:SetCost(s.cost)
-- e1:SetCondition(s.condition)
-- e1:SetTarget(s.sptg)
-- e1:SetOperation(s.spop)
-- c:RegisterEffect(e1)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(s.cost)
e1:SetCondition(s.condition)
e1:SetTarget(s.sptg)
e1:SetOperation(s.spop)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(s.eqtg)
e1:SetOperation(s.eqop)
c:RegisterEffect(e1)
--deckdes
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
......@@ -25,6 +34,61 @@ function s.initial_effect(c)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(s.handcon)
c:RegisterEffect(e3)
end
function s.filter(c)
return c:IsFaceup()
end
function s.eqfilter(c)
return c:IsSetCard(0xf) and c:IsType(TYPE_MONSTER)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>2
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,3,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK,0,nil)
if tc:IsRelateToEffect(e) and g:GetCount()>2 and Duel.GetLocationCount(tp,LOCATION_SZONE)>2 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:Select(tp,3,3,nil)
local ec=sg:GetFirst()
for ec in aux.Next(sg) do
if not Duel.Equip(tp,ec,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(500)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(s.repval)
ec:RegisterEffect(e3)
end
end
end
function s.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE+REASON_EFFECT)~=0
end
function s.cfilter1(c,tp)
return c:IsSetCard(0xf) and c:IsType(TYPE_MONSTER) and c:IsAbleToGraveAsCost()
......@@ -79,4 +143,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
end
function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),0,LOCATION_MZONE)~=0
end
\ No newline at end of file
--武装龙的咆哮
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(s.condition)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(9411399,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.target1)
e2:SetOperation(s.operation1)
c:RegisterEffect(e2)
end
function s.cfilter(c)
return c:IsFaceup() and c:IsSetCard(0x111) and c:IsType(TYPE_MONSTER)
end
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function s.filter1(c)
return c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.filter2(c)
return c:IsFaceup() and c:IsSetCard(0x111) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
end
function s.filter3(c)
return c:IsFaceup() and c:IsSetCard(0x111) and c:IsType(TYPE_MONSTER)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local lg=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if lg:GetCount()<=0 then return false end
local sg=lg:GetMaxGroup(Card.GetLevel)
local tg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,sg)
if chk==0 then return tg:GetCount()>0 and sg:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tg,tg:GetCount(),0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local lg=Duel.GetMatchingGroup(s.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local lg1=Duel.GetMatchingGroup(s.filter3,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=lg:GetMaxGroup(Card.GetLevel)
local tg=Duel.GetMatchingGroup(s.filter1,tp,LOCATION_MZONE,LOCATION_MZONE,sg)
local tc=tg:GetFirst()
local ct=0
while tc do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_SET_ATTACK_FINAL)
e3:SetValue(0)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
ct=ct+1
tc=tg:GetNext()
end
if lg1 and ct>0 then
local tc1=lg1:GetFirst()
while tc1 do
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetValue(s.elimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc1:RegisterEffect(e1)
tc1=lg1:GetNext()
end
end
end
function s.elimit(e,te)
return te:GetOwner()~=e:GetOwner()
end
function s.lvfilter(c)
return c:IsSetCard(0x111) and c:IsType(TYPE_MONSTER) and c:GetLevel()>0
end
function s.lvfilter1(c)
return c:IsRace(RACE_DRAGON) and c:IsType(TYPE_MONSTER) and c:IsFaceup()
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.lvfilter(chkc) and Duel.IsExistingMatchingCard(s.lvfilter1,tp,LOCATION_MZONE,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(s.lvfilter,tp,LOCATION_GRAVE,0,1,nil) and Duel.IsExistingMatchingCard(s.lvfilter1,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.lvfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.SetChainLimit(aux.FALSE)
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local tl=tc:GetLevel()
local g=Duel.GetMatchingGroup(s.lvfilter1,tp,LOCATION_MZONE,0,nil)
local tg=g:GetFirst()
while tg do
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(tl*700)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tg:RegisterEffect(e3)
tg=g:GetNext()
end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(s.checkop)
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_CANNOT_ATTACK_ANNOUNCE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(s.atkcon)
e2:SetTarget(s.atktg)
e1:SetLabelObject(e2)
Duel.RegisterEffect(e2,tp)
end
function s.atkcon(e)
return Duel.GetFlagEffect(e:GetHandlerPlayer(),id)>0
end
function s.atktg(e,c)
return c:GetFieldID()~=e:GetLabel()
end
function s.checkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetFlagEffect(tp,id)~=0 then return end
local fid=eg:GetFirst():GetFieldID()
Duel.RegisterFlagEffect(tp,id,RESET_PHASE+PHASE_END,0,1)
e:GetLabelObject():SetLabel(fid)
end
\ No newline at end of file
--武装龙的羁绊
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_EQUIP+CATEGORY_DRAW)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.target1)
e2:SetOperation(s.operation1)
c:RegisterEffect(e2)
end
function s.filter(c,tp)
local cl=c:GetLevel()
local cl1=math.floor(cl/4)
return c:IsSetCard(0x41) and Duel.IsExistingMatchingCard(s.nfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,true,false) and Duel.IsPlayerCanDraw(tp,cl1+1)
end
function s.nfilter(c,cd)
return (c:IsCode(cd) or c:IsSetCard(0xf)) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and s.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local tg=Duel.SelectTarget(tp,s.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,tg,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sc=Duel.SelectMatchingCard(tp,s.nfilter,tp,LOCATION_DECK,0,1,1,nil,tc:GetCode()):GetFirst()
if not Duel.Equip(tp,sc,tc) then return end
--equip limit
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
sc:RegisterEffect(e1)
local cl=tc:GetLevel()
if cl<4 then return false end
local cl1=math.floor(cl/4)
if Duel.IsPlayerCanDraw(tp,cl1) then
Duel.Draw(tp,cl1,REASON_EFFECT)
end
end
end
function s.filter1(c,tp)
return c:IsSetCard(0x41) and c:IsType(TYPE_MONSTER) and Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetAttribute(),c:GetRace(),c:GetLevel())
end
function s.thfilter(c,at,ra,lv)
return (c:IsSetCard(0xf) or ((c:IsAttribute(at) or c:IsRace(ra)) and (c:IsLevelBelow(lv+4) and c:IsLevelAbove(lv+2)) and c:IsType(TYPE_MONSTER))) and c:IsAbleToHand()
end
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter1(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(s.filter1,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
Duel.SelectTarget(tp,s.filter1,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.operation1(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.GetFirstTarget()
if tg then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,tg:GetAttribute(),tg:GetRace(),tg:GetLevel())
if g:GetCount()<=0 then return end
local g1=g:GetFirst()
Duel.SendtoHand(g1,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g1)
end
end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
c:SetSPSummonOnce(id)
c:EnableReviveLimit()
aux.AddLinkProcedure(c,s.mfilter,1,1)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,1))
e1:SetType(EFFECT_TYPE_TRIGGER_O+EFFECT_TYPE_SINGLE)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DIRECT_ATTACK)
c:RegisterEffect(e2)
--damage reduce
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e3:SetCondition(s.rdcon)
e3:SetValue(aux.ChangeBattleDamage(1,HALF_DAMAGE))
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_LEAVE_FIELD)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCondition(s.spcon)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.mfilter(c)
return c:IsLevelAbove(7) and c:IsSummonLocation(LOCATION_HAND)
end
function s.setfilter(c)
return c:IsCode(5318639,62279055) and c:IsSSetable() and c:IsType(TYPE_SPELL,TYPE_TRAP)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
if chk==0 then return g:GetClassCount(Card.GetCode)==2 end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if ft<2 then return end
local g=Duel.GetMatchingGroup(s.setfilter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:SelectSubGroup(tp,aux.dncheck,false,2,2)
if sg:GetCount()>0 then
Duel.SSet(tp,sg)
end
end
end
function s.rdcon(e)
local c=e:GetHandler()
local tp=e:GetHandlerPlayer()
return Duel.GetAttackTarget()==nil
and c:GetEffectCount(EFFECT_DIRECT_ATTACK)<2 and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0
end
function s.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE)
and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.spfilter(c,e,tp)
return c:GetBaseAttack()==0 and c:IsType(TYPE_RITUAL) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_RITUAL,tp,false,true)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
end
function s.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,s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
tc:SetMaterial(nil)
Duel.SpecialSummon(tc,SUMMON_TYPE_RITUAL,tp,tp,false,true,POS_FACEUP)
tc:CompleteProcedure()
end
end
\ No newline at end of file
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb02) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,12 +120,14 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
end
function s.vfilter2(c,g)
return g:IsContains(c)
end
function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ec=c:GetEquipTarget() -- 获取当前装备的目标怪兽
......@@ -137,26 +139,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -166,9 +183,9 @@ end
-- 效果③:墓地检索
function s.thfilter(c)
return c:IsSetCard(0xb03) and c:IsAbleToHand()
return (c:IsSetCard(0xb03) or c:IsCode(100240201)) and c:IsAbleToHand()
end
function s.thtg(tp,eg,ep,ev,re,r,rp,chk)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb03)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb03)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb03) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb02)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -166,9 +181,9 @@ end
-- 效果③:墓地检索
function s.thfilter(c)
return c:IsSetCard(0xb02) and c:IsAbleToHand()
return (c:IsSetCard(0xb02) or c:IsCode(100240201)) and c:IsAbleToHand()
end
function s.thtg(tp,eg,ep,ev,re,r,rp,chk)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb02) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -164,7 +179,7 @@ end
function s.filter(c,e,tp)
return c:IsSetCard(0xb03) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsSetCard(0xb03) or c:IsCode(100240201)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb03) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -164,7 +179,7 @@ end
function s.filter(c,e,tp)
return c:IsSetCard(0xb02) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsSetCard(0xb02) or c:IsCode(100240201)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb02) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -164,7 +179,7 @@ end
function s.filter(c,e,tp)
return c:IsSetCard(0xb03) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsSetCard(0xb03) or c:IsCode(100240201)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb03) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -165,7 +180,7 @@ end
function s.filter(c,e,tp)
return c:IsSetCard(0xb02) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return (c:IsSetCard(0xb02) or c:IsCode(100240201)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb02) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -167,18 +182,18 @@ function s.filter(c)
return c:IsFaceup()
end
function s.eqfilter(c)
return c:IsSetCard(0xb03) and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0xb03) or c:IsCode(100240201)) and c:IsType(TYPE_MONSTER)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,nil)
local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK,0,1,nil)
if tc:IsRelateToEffect(e) and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:Select(tp,1,1,nil)
......@@ -191,7 +206,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetValue(s.eqlimit2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
......
......@@ -101,7 +101,7 @@ end
-- Helper functions for ② effect
function s.bo1filter(c)
return c:IsRace(RACE_ROCK) and c:IsCode(0xb02)
return c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb03) or c:IsCode(100240201))
end
......@@ -109,7 +109,7 @@ function s.batcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetEquipTarget()
if not ec then return false end
local bc=ec:GetBattleTarget()
return bc and ((bc:IsRace(RACE_ROCK) and bc:IsCode(0xb02)) or
return bc and ((bc:IsRace(RACE_ROCK) and (bc:IsSetCard(0xb03) or bc:IsCode(100240201))) or
(bc:GetEquipGroup():IsExists(s.bo1filter,1,nil))) and Duel.GetAttackTarget()~=nil
end
......@@ -120,7 +120,7 @@ end
function s.vfilter(c,tp)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and c:IsSetCard(0xb03)
return c:IsFaceup() and c:IsRace(RACE_ROCK) and (c:IsSetCard(0xb02) or c:IsCode(100240201))
end
function s.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(s.vfilter,1,nil,tp)
......@@ -137,26 +137,41 @@ function s.eqop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
-- 选择新的装备目标
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,ec)
local g=eg:Filter(s.vfilter,nil,tp)
if #g==0 then return end
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() or not tc:IsRelateToEffect(e) then return end
-- 将ec装备到tc上
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
if g:GetCount()==1 then
local tc=g:GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local tc=Duel.SelectMatchingCard(tp,s.vfilter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,g):GetFirst()
if not tc or not tc:IsFaceup() then return end
if Duel.Equip(tp,ec,tc,false) then
-- 添加装备限制效果
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(s.eqlimit2)
e1:SetLabelObject(tc)
ec:RegisterEffect(e1) -- 在ec上注册效果
-- 如果需要,可以在c上添加其他效果
end
end
end
......@@ -165,18 +180,18 @@ function s.filter(c)
return c:IsFaceup()
end
function s.eqfilter(c)
return c:IsSetCard(0xb02) and c:IsType(TYPE_MONSTER)
return (c:IsSetCard(0xb02) or c:IsCode(100240201)) and c:IsType(TYPE_MONSTER)
end
function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil) end
and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,nil)
local g=Duel.GetMatchingGroup(s.eqfilter,tp,LOCATION_DECK,0,1,nil)
if tc:IsRelateToEffect(e) and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:Select(tp,1,1,nil)
......@@ -189,7 +204,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(s.eqlimit)
e1:SetValue(s.eqlimit2)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
ec:RegisterEffect(e1)
end
......
......@@ -60,7 +60,7 @@ function s.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,1,nil)
local g=Duel.GetMatchingGroup(aux.NecroValleyFilter(s.eqfilter),tp,LOCATION_GRAVE,0,nil)
if tc:IsRelateToEffect(e) and g:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local sg=g:Select(tp,1,1,nil)
......
......@@ -19,7 +19,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
end
function s.chkfilter(c)
return c:IsFaceupEx() and c:IsSetCard(0x40)
return c:IsFaceupEx() and (c:IsSetCard(0x40) or c:IsCode(13893596))
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.chkfilter,tp,LOCATION_HAND+LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil) and Duel.IsPlayerCanDraw(tp,1) end
......@@ -81,11 +81,11 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
e2:SetOwnerPlayer(tp)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_ATTACK_ALL)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
e3:SetValue(1)
e3:SetCondition(s.acon)
e3:SetOwnerPlayer(tp)
......@@ -95,7 +95,7 @@ function s.tdop(e,tp,eg,ep,ev,re,r,rp)
end
end
function s.efilter(e,re)
return e:GetOwnerPlayer()~=re:GetOwnerPlayer()
return e:GetOwnerPlayer()~=re:GetOwnerPlayer() and re:IsActivated()
end
function s.acon(e)
return e:GetHandlerPlayer()==e:GetOwnerPlayer()
......
......@@ -8,7 +8,7 @@ function s.initial_effect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(s.splimit)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -52,9 +52,6 @@ end
function s.mfilter2(c)
return (c:IsSetCard(0xb03) or c:IsCode(100240201)) and c:IsRace(RACE_ROCK)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.imcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
......
......@@ -47,15 +47,17 @@ function s.thfilter(c)
return c:IsSetCard(0xa5) and c:IsAbleToHand()
end
function s.filter(c)
return c:IsSetCard(0x8) and c:IsFaceup()
return c:IsSetCard(0x8) and c:IsFaceupEx()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(s.filter,nil)
local ag=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ct=aux.GetAttributeCount(ag)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,ct,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,ct,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroup(tp,LOCATION_MZONE,0):FilterCount(s.filter,nil)
local ag=Duel.GetMatchingGroup(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,0,nil)
local ct=aux.GetAttributeCount(ag)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.thfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,ct,ct,nil)
if #g>0 then
......
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCountLimit(1,id)
e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,id+id)
e2:SetCondition(s.setcon)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
c:RegisterEffect(e2)
--atk
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetValue(s.atkval)
c:RegisterEffect(e3)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_RITUAL)
end
function s.filter(c)
return c:IsType(TYPE_COUNTER) and c:IsSSetable()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return (Duel.GetFieldGroupCount(tp,0,LOCATION_DECK+LOCATION_HAND)>0
or Duel.IsExistingMatchingCard(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil))
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CODE)
getmetatable(e:GetHandler()).announce_filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
local ac=Duel.AnnounceCard(tp,table.unpack(getmetatable(e:GetHandler()).announce_filter))
Duel.SetTargetParam(ac)
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
local g1=Duel.GetFieldGroup(tp,0,LOCATION_DECK+LOCATION_HAND)
if g1:GetCount()>0 then
Duel.ConfirmCards(tp,g1)
local g2=Duel.GetMatchingGroup(Card.IsFacedown,tp,0,LOCATION_ONFIELD,nil)
if g2:GetCount()>0 then
Duel.ConfirmCards(tp,g2)
g1:Merge(g2)
local ac=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
local tg=g1:Filter(Card.IsCode,nil,ac)
local ag=tg:Filter(Card.IsLocation,nil,LOCATION_HAND+LOCATION_ONFIELD)
if tg~=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 and ag~=0 then
local rg=Group.CreateGroup()
local g3=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil,ac)
rg:Merge(g1)
rg:Merge(g3)
Duel.Remove(rg,POS_FACEDOWN,REASON_EFFECT)
end
end
end
function s.atkfilter(c)
return c:IsFaceupEx() and c:IsType(TYPE_TRAP)
end
function s.atkval(e,c)
return Duel.GetMatchingGroupCount(s.atkfilter,c:GetControler(),LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)*1000
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_COUNTER)
end
function s.setfilter(c)
return c:GetType()==TYPE_TRAP+TYPE_CONTINUOUS and c:IsSSetable()
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SSet(tp,g:GetFirst())
end
end
\ No newline at end of file
--赋炎的骑士
function c11451410.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(11451410,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,11451410)
e1:SetCondition(c11451410.condition)
e1:SetCost(c11451410.thcost)
e1:SetTarget(c11451410.thtg)
e1:SetOperation(c11451410.thop)
e1:SetCountLimit(1,id)
e1:SetCondition(s.condition)
e1:SetCost(s.thcost)
e1:SetTarget(s.thtg)
e1:SetOperation(s.thop)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(11451410,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,11451410)
e2:SetCondition(c11451410.spcon)
e2:SetTarget(c11451410.sptg)
e2:SetOperation(c11451410.spop)
e2:SetCountLimit(1,id)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
end
function c11451410.cfilter(c)
function s.cfilter(c)
return c:IsFaceup() and (c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE))
end
function c11451410.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11451410.cfilter,tp,LOCATION_ONFIELD,0,1,nil)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
end
function c11451410.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsDiscardable() end
Duel.SendtoGrave(c,REASON_COST+REASON_DISCARD)
end
function c11451410.thfilter(c)
return c:IsDefense(200) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsAbleToHand()
function s.thfilter(c)
return c:IsDefense(200) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevel(1) and c:IsAbleToHand()
end
function c11451410.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11451410.thfilter,tp,LOCATION_DECK,0,1,nil) end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c11451410.thop(e,tp,eg,ep,ev,re,r,rp)
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local tg=Duel.GetFirstMatchingCard(c11451410.thfilter,tp,LOCATION_DECK,0,nil)
local tg=Duel.GetFirstMatchingCard(s.thfilter,tp,LOCATION_DECK,0,nil)
if tg then
Duel.SendtoHand(tg,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
function c11451410.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c11451410.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c11451410.filter,tp,LOCATION_MZONE,0,1,nil)
end
function c11451410.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c11451410.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
local e1=Effect.CreateEffect(c)
......
--天灾预报 雷暴
function c114514001.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(c1145140011,1)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetHintTiming(TIMING_STANDBY_PHASE)
e1:SetCondition(c114514001.condition)
e1:SetCondition(s.condition)
e1:SetOperation(s.regop)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(114514001,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c114514001.handcon)
e2:SetCondition(s.handcon)
c:RegisterEffect(e2)
end
function c114514001.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY and Duel.GetTurnPlayer()==tp
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_STANDBY
end
local e1=Effect.CreateEffect(e:GetHandler())
function s.regop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetOperation(c114514001.desop)
e1:SetReset(RESET_PHASE+PHASE_END,2)
e1:SetOperation(s.desop)
Duel.RegisterEffect(e1,tp)
function c114514001.desop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(aux.TRUE,tp,0,LOCATION_ONFIELD,nil)
Duel.Destroy(g,REASON_EFFECT)
end
function c114514001.handcon(e)
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function s.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==0
end
\ No newline at end of file
......@@ -102,7 +102,7 @@ end
function s.valcheck(e,c)
local mg=c:GetMaterial()
local flag=0
if mg:IsExists(Card.IsFusionType,2,nil,TYPE_NORMAL) then flag=1 end
if mg:IsExists(Card.IsFusionType,3,nil,TYPE_NORMAL) then flag=1 end
e:GetLabelObject():SetLabel(flag)
end
--damage
......
......@@ -28,8 +28,7 @@ function s.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,id+id)
e2:SetCost(s.spcost)
......
......@@ -31,7 +31,7 @@ function s.initial_effect(c)
e4:SetCategory(CATEGORY_LEAVE_GRAVE+CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCountLimit(1,id+1001)
e4:SetCost(s.thcost3)
e4:SetCondition(s.thcon)
e4:SetTarget(s.thtg3)
......
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
c:SetSPSummonOnce(id)
aux.AddFusionProcFunFun(c,aux.FilterBoolFunction(Card.IsRace,RACE_SPELLCASTER),aux.FilterBoolFunction(Card.IsFusionSetCard,0x18),2,true)
aux.AddContactFusionProcedure(c,Card.IsReleasable,LOCATION_MZONE,0,Duel.Release,REASON_COST+REASON_MATERIAL)
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
e0:SetValue(aux.fuslimit)
c:RegisterEffect(e0)
--battle indestructable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--selfdes
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(s.sdcon)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(0,LOCATION_MZONE)
e3:SetTarget(s.disable)
e3:SetCode(EFFECT_DISABLE)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(0,LOCATION_MZONE)
e4:SetCode(EFFECT_SET_ATTACK)
e4:SetValue(1)
e4:SetTarget(s.atktg)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EFFECT_SET_DEFENSE)
e5:SetValue(0)
c:RegisterEffect(e5)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_QUICK_O)
e6:SetCountLimit(1)
e6:SetProperty(EFFECT_FLAG_CARD_TARGET)
e6:SetCode(EVENT_FREE_CHAIN)
e6:SetRange(LOCATION_MZONE)
e6:SetCondition(s.stcon)
e6:SetTarget(s.sttg1)
e6:SetOperation(s.stop1)
c:RegisterEffect(e6)
local e7=Effect.CreateEffect(c)
e7:SetCategory(CATEGORY_GRAVE_ACTION+CATEGORY_TOHAND)
e7:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e7:SetCode(EVENT_LEAVE_FIELD)
e7:SetProperty(EFFECT_FLAG_DELAY)
e7:SetCondition(s.thcon)
e7:SetTarget(s.thtg)
e7:SetOperation(s.thop)
c:RegisterEffect(e7)
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD)
e8:SetCode(EFFECT_CANNOT_RELEASE)
e8:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e8:SetRange(LOCATION_MZONE)
e8:SetTargetRange(0,1)
e8:SetTarget(s.rellimit)
c:RegisterEffect(e8)
end
function s.atktg(e,c)
return c:IsFaceup()
end
function s.rellimit(e,c,tp)
return c==e:GetHandler()
end
function s.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function s.disable(e,c)
return c:IsType(TYPE_EFFECT) or c:GetOriginalType()&TYPE_EFFECT~=0
end
function s.filter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsForbidden() and (c:IsLocation(LOCATION_GRAVE) or c:IsControlerCanBeChanged() and c:IsControler(tp))
end
function s.stcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>=PHASE_BATTLE_START and Duel.GetCurrentPhase()<=PHASE_BATTLE
end
function s.sttg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE+LOCATION_GRAVE) and s.filter(chkc,1-tp) end
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,nil,1-tp)
and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,s.filter,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,1-tp)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,g,1,0,0)
end
function s.cfilter(c)
return c:IsFaceup() and c:GetType()==TYPE_CONTINUOUS+TYPE_SPELL
end
function s.stop1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e)
and Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
tc:RegisterEffect(e1)
local con=Duel.GetMatchingGroup(s.cfilter,tp,LOCATION_SZONE,0,nil)
if con:GetCount()==5 then
Duel.Damage(1-tp,8000,REASON_EFFECT)
end
end
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousControler(tp) and c:GetReasonPlayer()==1-tp
end
function s.thfilter(c)
return c:IsAbleToHand()
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,4,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,4,4,nil)
if g:GetCount()==4 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tg)
end
end
\ No newline at end of file
local s,id,o=GetID()
function s.initial_effect(c)
c:EnableReviveLimit()
aux.AddFusionProcFunRep(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x18),2,true)
aux.AddContactFusionProcedure(c,s.cfilter,LOCATION_HAND+LOCATION_MZONE+LOCATION_GRAVE,0,aux.tdcfop(c))
--
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_SINGLE)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e0)
--
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e1:SetValue(1)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(s.sdcon)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
c:RegisterEffect(e3)
--
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_CHAINING)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id)
e4:SetCondition(s.chcon)
e4:SetCost(s.chcost)
e4:SetTarget(s.chtg)
e4:SetOperation(s.chop)
c:RegisterEffect(e4)
end
function s.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsAbleToDeckOrExtraAsCost()
end
function s.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENSE)
end
function s.chcon(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp and re:IsActiveType(TYPE_MONSTER)
end
function s.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function s.filter(c)
return (c:IsType(TYPE_MONSTER) and c:IsSetCard(0x40) or c:IsCode(114515015)) and c:IsAbleToHand()
end
function s.chtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,rp,0,LOCATION_DECK,1,nil) end
end
function s.chop(e,tp,eg,ep,ev,re,r,rp)
local g=Group.CreateGroup()
Duel.ChangeTargetCard(ev,g)
Duel.ChangeChainOperation(ev,s.repop)
end
function s.repop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(1-tp,s.filter,tp,0,LOCATION_DECK,1,1,nil)
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
\ No newline at end of file
--命运英雄 荒芜人
local s,id,o=GetID()
function s.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetOperation(s.addc)
e1:SetCost(s.thcost)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCountLimit(1,id)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--reequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,2))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id)
e2:SetCost(s.recost)
e2:SetTarget(s.retg)
e2:SetOperation(s.reop)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCountLimit(1,id+1000)
e2:SetTarget(s.sptg2)
e2:SetOperation(s.spop2)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1)
e3:SetTarget(s.destg)
e3:SetOperation(s.desop)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsCode(75041269) and c:IsCanAddCounter(0x1b,1)
end
function s.ctfilter1(c)
return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup() or c:GetEquipTarget()) and c:IsSetCard(0x8)
end
function s.addc(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
local g=Duel.SelectMatchingCard(tp,s.ctfilter1,tp,LOCATION_MZONE+LOCATION_GRAVE,LOCATION_MZONE+LOCATION_GRAVE,1,1,nil,ct)
local tc=g:GetFirst()
if c:IsFaceup() and c:IsRelateToEffect(e) and ct>0 then
c:AddCounter(0x1b,ct)
end
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id+1001)
e4:SetCost(s.spcost)
e4:SetOperation(s.spop)
c:RegisterEffect(e4)
end
function s.costfilter(c)
return c:IsFaceup() and c:IsSetCard(0xc008) and c:IsAbleToHandAsCost()
return c:IsType(TYPE_EQUIP) or c:IsType(TYPE_FIELD) or c:IsType(TYPE_CONTINUOUS)
end
function s.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.HintSelection(g)
Duel.SendtoHand(g,nil,REASON_COST)
function s.pfilter(c)
return c:IsType(TYPE_FIELD) and c:IsCode(75041269) and not c:IsForbidden()
end
function s.refilter(c,tc,tp,exclude_modern_count)
return aux.CheckUnionEquip(c,tc,exclude_modern_count) and c:CheckUnionTarget(tc) and c:IsSetCard(0xc008)
and c:CheckUniqueOnField(tp) and not c:IsForbidden()
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_ONFIELD) and s.costfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,s.costfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function s.retg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local c=e:GetHandler()
local exct=aux.IsUnionState(e) and 1 or 0
return c:GetEquipTarget()
and Duel.IsExistingMatchingCard(s.refilter,tp,LOCATION_DECK,0,1,nil,c:GetEquipTarget(),tp,exct)
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local p=tc:GetControler()
if tc:IsRelateToEffect(e) and Duel.Destroy(tc,REASON_EFFECT)~=0 and Duel.IsExistingMatchingCard(s.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil) then
if p==tp then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc1=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc1 then
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc1,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOFIELD)
local tc2=Duel.SelectMatchingCard(tp,s.pfilter,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil):GetFirst()
if tc2 then
local fc=Duel.GetFieldCard(tp,0,LOCATION_FZONE)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc2,tp,1-tp,LOCATION_FZONE,POS_FACEUP,true)
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
end
local tc=e:GetLabelObject()
Duel.SetTargetCard(tc)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,tc,1,0,0)
end
function s.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
function s.filter(c)
return c:IsSetCard(0xc008) and c:IsType(TYPE_MONSTER) and not c:IsForbidden()
end
function s.sptg2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_DECK)
end
function s.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,s.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)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.Equip(tp,tc,c) 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(s.eqlimit)
tc:RegisterEffect(e1)
end
end
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
function s.eqlimit(e,c)
return e:GetOwner()==c
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
function s.cfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() and c:IsSetCard(0xc008)
end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter,tp,LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(s.ctfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,1,nil) end
local g=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
function s.ctfilter1(c)
return c:IsFaceup() and c:IsCode(75041269) and c:IsCanAddCounter(0x1b,1)
end
function s.ctfilter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsSetCard(0x8)
end
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.ctfilter1,tp,LOCATION_FZONE,LOCATION_FZONE,nil)
local tc=g:GetFirst()
local ct=Duel.GetMatchingGroupCount(s.ctfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,LOCATION_GRAVE+LOCATION_ONFIELD,nil)
while tc do
tc:AddCounter(0x1b,ct)
tc=g:GetNext()
end
end
\ No newline at end of file
......@@ -4,26 +4,25 @@ function s.initial_effect(c)
--equip
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_GRAVE,LOCATION_HAND)
e2:SetRange(LOCATION_GRAVE+LOCATION_HAND)
e2:SetCountLimit(1,id)
e2:SetTarget(s.eqtg)
e2:SetOperation(s.eqop)
c:RegisterEffect(e2)
--attack limit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_EQUIP)
e6:SetCode(EFFECT_CANNOT_ATTACK)
e6:SetValue(aux.tgoval)
c:RegisterEffect(e6)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e5:SetValue(aux.imval1)
c:RegisterEffect(e5)
--disable
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetValue(aux.tgoval)
e3:SetCondition(s.negcon)
e3:SetOperation(s.negop)
c:RegisterEffect(e3)
--togy
......@@ -33,14 +32,14 @@ function s.initial_effect(c)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCountLimit(1,id)
e4:SetCountLimit(1,id+1000)
e4:SetCondition(s.tgcon)
e4:SetTarget(s.tgtg)
e4:SetOperation(s.tgop)
c:RegisterEffect(e4)
end
function s.eqfilter(c)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x8)) or c:IsCode(76263644)
return c:IsFaceup() and (c:IsAttribute(ATTRIBUTE_DARK) and c:IsSetCard(0x8) or c:IsCode(76263644))
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and s.eqfilter(chkc) end
......@@ -70,14 +69,14 @@ end
function s.eqlimit(e,c)
return c==e:GetLabelObject()
end
function s.negcon(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return re:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
and g and g:IsExists(e:GetHandler():GetEquipTarget(),1,nil)
and Duel.IsChainDisablable(ev) and not Duel.IsChainDisabled(ev)
end
function s.negop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectEffectYesNo(tp,e:GetHandler()) then
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD,0,1)
if Duel.NegateEffect(ev) then
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end
Duel.NegateEffect(ev)
end
function s.tgcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE)
......
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,76263644)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_EQUIP+CATEGORY_DISABLE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
......@@ -20,6 +21,7 @@ function s.initial_effect(c)
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetRange(LOCATION_GRAVE)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCost(aux.bfgcost)
e3:SetTarget(s.dmgtg)
......@@ -128,7 +130,7 @@ function s.dmgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function s.dmgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
local d=math.ceil(g:GetFirst():GetAttack()/2)
local d=math.ceil(tc:GetAttack()/2)
if tc and tc:IsFaceup() and tc:IsRelateToEffect(e) then
if Duel.Damage(1-tp,d,REASON_EFFECT) and Duel.IsExistingMatchingCard(s.ddfilter,tp,LOCATION_MZONE,0,1,nil) then
Duel.Damage(1-tp,1500,REASON_EFFECT)
......
--灰灭之龙穴
local s,id,o=GetID()
function s.initial_effect(c)
--change name
aux.EnableChangeCode(c,3055018,LOCATION_HAND+LOCATION_DECK+LOCATION_ONFIELD+LOCATION_GRAVE)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Atk
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetCondition(s.condition)
e2:SetTarget(s.atktg)
c:RegisterEffect(e2)
--disable
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_FZONE)
e3:SetCondition(s.discon)
e3:SetOperation(s.disop)
c:RegisterEffect(e3)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetDescription(1152)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_DELAY)
e4:SetCode(EVENT_DESTROYED)
e4:SetCountLimit(1,id)
e4:SetCondition(s.thcon)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
local e5=e4:Clone()
e5:SetCode(EVENT_REMOVE)
c:RegisterEffect(e5)
end
function s.atkfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PYRO) and c:IsAttribute(ATTRIBUTE_DARK)
end
function s.atktg(e,c)
return not c:IsRace(RACE_PYRO)
end
function s.condition(e)
local tp=e:GetHandlerPlayer()
return Duel.GetMatchingGroupCount(s.atkfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)>=1
end
function s.cfilter(c)
return c:IsFaceup() and c:IsRace(RACE_PYRO) and c:IsAttribute(ATTRIBUTE_DARK) and c:IsLevelAbove(8)
end
function s.discon(e,tp,eg,ep,ev,re,r,rp)
local atk=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_ATTACK)
return Duel.GetMatchingGroupCount(s.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)>=1 and re:IsActiveType(TYPE_MONSTER) and atk==0
end
function s.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
function s.thcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_FZONE)
end
function s.thfilter(c)
return c:IsSetCard(0x1ad) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,s.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
\ No newline at end of file
--灰灭都的幸存者
function c191981302.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,3055018)
--special summon
local e1=Effect.CreateEffect(c)
......@@ -7,88 +8,80 @@ function c191981302.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND)
e1:SetCountLimit(1,191981302+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c191981302.sprcon)
e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(s.sprcon)
c:RegisterEffect(e1)
--spsummon other
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(191981302,0))
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
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,191981302)
e2:SetCondition(c191981302.spcon)
e2:SetCost(c191981302.spcost)
e2:SetTarget(c191981302.sptg)
e2:SetOperation(c191981302.spop)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_MAIN_END)
e2:SetCountLimit(1,id+1000)
e2:SetCondition(s.spcon)
e2:SetCost(s.spcost)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(191981302,0))
e3:SetCategory(CATEGORY_DAMAGE)
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_LEAVE_FIELD)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e3:SetCondition(c191981302.spcon1)
e3:SetTarget(c191981302.sptg1)
e3:SetOperation(c191981302.spop1)
e3:SetCountLimit(1,id+1001)
e3:SetCondition(s.spcon1)
e3:SetTarget(s.sptg1)
e3:SetOperation(s.spop1)
c:RegisterEffect(e3)
end
function c191981302.sprfilter(c)
function s.sprfilter(c)
return c:IsFaceup() and c:IsCode(3055018)
end
function c191981302.sprcon(e,c)
function s.sprcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c191981302.sprfilter,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
and Duel.IsExistingMatchingCard(s.sprfilter,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function c191981302.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsReleasable() and Duel.GetMZoneCount(tp,c)>0 end
Duel.Release(c,REASON_COST)
end
function c191981302.filter(c,e,tp)
function s.filter(c,e,tp)
return c:IsSetCard(0x1ad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and not c:IsLevel(6)
end
function c191981302.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c191981302.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c191981302.spop(e,tp,eg,ep,ev,re,r,rp)
function s.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,c191981302.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local g=Duel.SelectMatchingCard(tp,s.filter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
function c191981302.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:GetFlagEffect(191981302)>0 and (Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c191981302.spcon1(e,tp,eg,ep,ev,re,r,rp)
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and (c:IsReason(REASON_BATTLE) or (c:GetReasonPlayer()==1-tp and c:IsReason(REASON_EFFECT)))
and c:IsPreviousPosition(POS_FACEUP)
end
function c191981302.cfilter(c,e,tp)
return c:IsCode(191981302) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
return c:IsReason(REASON_BATTLE+REASON_EFFECT)
end
function c191981302.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c191981302.cfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLocation(LOCATION_GRAVE) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c191981302.spop1(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(c191981302.cfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
function s.spop1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
--灰灭之影
local s,id,o=GetID()
function c191981303.initial_effect(c)
--search or spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1,id,EFFCT_COUNT_CODE_SINGLE)
e2:SetTarget(s.thtg)
e2:SetOperation(s.thop)
c:RegisterEffect(e2)
--set
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,1))
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.setcon)
e3:SetTarget(s.settg)
e3:SetOperation(s.setop)
c:RegisterEffect(e3)
local s,id=GetID()
function s.initial_effect(c)
-- ①效果:检索或特殊召唤"灭亡龙 威多释"
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(s.target1)
e1:SetOperation(s.activate1)
c:RegisterEffect(e1)
-- ②效果:特殊召唤"灰灭"怪兽
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetTarget(s.target2)
e2:SetOperation(s.activate2)
c:RegisterEffect(e2)
-- ③效果:结束阶段盖放
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_PHASE+PHASE_END)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,id)
e3:SetCondition(s.condition3)
e3:SetTarget(s.target3)
e3:SetOperation(s.activate3)
c:RegisterEffect(e3)
end
function s.thfilter(c,e,tp)
if not (c:IsCode(78783557)) then return false end
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))
-- ①效果目标函数
function s.filter1(c,e,tp)
return c:IsCode(78783557) and (c:IsAbleToHand() or (Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)))
end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
function s.filter2(c,e,tp)
return c:IsCode(78783557)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE)~=0 and tc:IsCode(78783557) and Duel.IsExistingMatchingCard(s.thfilter,tp,0,LOCATION_DECK,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_PYRO)
e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
tc=g:GetNext()
end
function s.filter4(c,e,tp)
return c:IsCode(3055018)
end
function s.filter(c)
return c:IsFaceup() and c:IsAbleToGrave()
function s.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.filter1,tp,LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_GRAVE)
end
function s.spfilter(c,e,tp)
return c:IsSetCard(0x1ad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsCode(3055018)
function s.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter1),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
local b2=Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp)
local op=0
if b1 and b2 then
op=Duel.SelectOption(tp,aux.Stringid(id,2),aux.Stringid(id,3))
elseif b1 then
op=0
else
op=1
end
if op==0 then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
if Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)~=0 then
-- 改变场上所有怪兽种族为炎族
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_RACE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(RACE_PYRO)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
end
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and s.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(s.filter,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,s.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,LOCATION_GRAVE)
-- ②效果:特殊召唤"灰灭"怪兽
function s.filter3(c,e,tp)
return c:IsSetCard(0x1ad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
if Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,s.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp) and Duel.SelectMatchingCard(tp,s.sprfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.BreakEffect()
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
end
function s.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsFaceup() end
if chk==0 then
return Duel.IsExistingTarget(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.filter3,tp,LOCATION_HAND,0,1,nil,e,tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function s.setcon(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer() and Duel.IsExistingMatchingCard(Card.IsCode,tp,LOCATION_GRAVE,0,2,nil,id)
function s.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc or not tc:IsRelateToEffect(e) then return end
--检查是否有场地区域3055018
local loc=LOCATION_HAND
if Duel.IsExistingMatchingCard(s.filter4,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil) then
loc=loc+LOCATION_GRAVE
end
-- 特殊召唤处理
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.filter3),tp,loc,0,1,1,nil,e,tp)
if #g>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
end
-- ③效果条件函数
function s.condition3(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.filter2,tp,LOCATION_GRAVE,0,1,nil)
end
-- ③效果目标函数
function s.target3(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsSSetable() end
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,c,1,0,0)
end
function s.setop(e,tp,eg,ep,ev,re,r,rp)
function s.activate3(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and aux.NecroValleyFilter()(c) then Duel.SSet(tp,c) end
end
if c:IsRelateToEffect(e) then Duel.SSet(tp,c) end
end
\ No newline at end of file
--灰灭都的潜伏者 威多释
function c191981304.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--change name
aux.EnableChangeCode(c,78783557,LOCATION_DECK+LOCATION_GRAVE)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(191981304,0))
e1:SetDescription(aux.Stringid(id,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetCountLimit(1,191981304)
e1:SetTarget(c191981304.settg)
e1:SetOperation(c191981304.setop)
e1:SetCountLimit(1,id)
e1:SetTarget(s.settg)
e1:SetOperation(s.setop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(191981304,0))
e3:SetDescription(aux.Stringid(id,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCountLimit(1,36521307)
e3:SetCost(c191981304.spcost)
e3:SetTarget(c191981304.sptg)
e3:SetOperation(c191981304.spop)
e3:SetCountLimit(1,id+1000)
e3:SetCost(s.spcost)
e3:SetTarget(s.sptg)
e3:SetOperation(s.spop)
c:RegisterEffect(e3)
--special summon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(191981304,1))
e4:SetDescription(aux.Stringid(id,1))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e4:SetRange(LOCATION_MZONE+LOCATION_HAND)
e4:SetCountLimit(1,191981304)
e4:SetCost(c191981304.spcost1)
e4:SetTarget(c191981304.sptg1)
e4:SetOperation(c191981304.spop1)
e4:SetCountLimit(1,id+1001)
e4:SetCondition(s.spcon)
e4:SetCost(s.spcost1)
e4:SetTarget(s.thtg)
e4:SetOperation(s.thop)
c:RegisterEffect(e4)
end
function c191981304.setfilter(c)
function s.setfilter(c)
return c:IsSetCard(0x1ad) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSSetable()
end
function c191981304.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c191981304.setfilter,tp,LOCATION_DECK,0,1,nil) end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.setfilter,tp,LOCATION_DECK,0,1,nil) end
end
function c191981304.setop(e,tp,eg,ep,ev,re,r,rp)
function s.setop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,c191981304.setfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.setfilter,tp,LOCATION_DECK,0,1,1,nil)
if #g>0 then
Duel.SSet(tp,g)
end
end
function c191981304.costfilter(c)
function s.costfilter(c)
return c:IsType(TYPE_FIELD) and c:IsAbleToGraveAsCost()
end
function c191981304.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c191981304.costfilter,tp,LOCATION_DECK,0,1,nil) end
function s.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c191981304.costfilter,tp,LOCATION_DECK,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c191981304.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c191981304.spop(e,tp,eg,ep,ev,re,r,rp)
function s.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c191981304.splimit(e,c)
function s.splimit(e,c)
return c:IsLocation(LOCATION_EXTRA) and not c:IsRace(RACE_PYRO)
end
function c191981304.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
function s.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c191981304.spfilter(c,e,tp)
return c:IsCode(78783557) and (c:IsCanBeSpecialSummoned(e,0,tp,false,false) or c:IsAbleToHand())
function s.thfilter(c,e,tp)
if not c:IsCode(78783557) then return false end
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
return c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp))
end
function c191981304.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsFaceup()
function s.desfilter(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS+TYPE_FIELD)
end
function c191981304.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c191981304.spfilter,tp,0,LOCATION_DECK,1,nil,e,tp)
and Duel.IsExistingMatchingCard(c191981304.filter,tp,0,LOCATION_DECK,1,nil,e,tp)
end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK,LOCATION_HAND)
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(s.desfilter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil)
end
function c191981304.spop1(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 g1=Duel.SelectMatchingCard(tp,c191981304.spfilter,tp,0,LOCATION_DECK,1,1,nil,e,tp)
local g2=Duel.SelectMatchingCard(tp,c191981304.filter,tp,0,LOCATION_DECK,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g1,g2,0,tp,tp,false,false,POS_FACEUP)
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function s.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,s.thfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
local ft=Duel.GetLocationCount(1-tp,LOCATION_MZONE)
local tc=g:GetFirst()
if tc then
if tc:IsAbleToHand() and (not tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,1-tp) or ft<=0 or Duel.SelectOption(tp,1190,1152)==0) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
else
Duel.SpecialSummon(tc,0,tp,1-tp,false,false,POS_FACEUP)
end
end
end
\ No newline at end of file
......@@ -2,94 +2,177 @@
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(Card.IsFusionSetCard,0x1ad),s.ffilter,true)
aux.AddContactFusionProcedure(c,Card.IsAbleToRemoveAsCost,LOCATION_ONFIELD,LOCATION_GRAVE,0,Duel.Remove,POS_FACEUP,REASON_COST)
c:EnableReviveLimit()
aux.AddFusionProcFun2(c,aux.FilterBoolFunction(s.ffilter1),aux.FilterBoolFunction(s.ffilter),true)
--spsummon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
e1:SetCondition(s.con)
c:RegisterEffect(e1)
--indes
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetRange(LOCATION_MZONE)
e2:SetTargetRange(LOCATION_FZONE,0)
e2:SetValue(1)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetRange(LOCATION_EXTRA)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
--ind effect
--indes
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetRange(LOCATION_MZONE)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_FZONE,0)
e3:SetValue(1)
c:RegisterEffect(e3)
--destroy
--ind effect
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_QUICK_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_FREE_CHAIN)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1,id)
e4:SetTarget(s.destg)
e4:SetOperation(s.desop)
e4:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e4:SetValue(1)
c:RegisterEffect(e4)
--spsummon
--destroy/remove
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_SPECIAL_SUMMON)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_TO_GRAVE,EVENT_REMOVE)
e5:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e5:SetCondition(s.spcon)
e5:SetTarget(s.sptg)
e5:SetOperation(s.spop)
e5:SetDescription(aux.Stringid(id,0))
e5:SetCategory(CATEGORY_DESTROY)
e5:SetType(EFFECT_TYPE_QUICK_O)
e5:SetProperty(EFFECT_FLAG_CARD_TARGET)
e5:SetCode(EVENT_FREE_CHAIN)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1,id)
e5:SetCondition(s.condition)
e5:SetTarget(s.target)
e5:SetOperation(s.activate)
c:RegisterEffect(e5)
--spsummon
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(id,1))
e6:SetCategory(CATEGORY_SPECIAL_SUMMON)
e6:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e6:SetCode(EVENT_TO_GRAVE,EVENT_REMOVE)
e6:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e6:SetCondition(s.spcon1)
e6:SetTarget(s.sptg1)
e6:SetOperation(s.spop1)
c:RegisterEffect(e6)
end
function s.ffilter(c)
return c:IsLevelBelow(8) and c:IsRace(RACE_PYRO)
return (c:IsLevelBelow(8) and c:IsRace(RACE_PYRO))
end
function s.ffilter1(c)
return c:IsSetCard(0x1ad) and c:IsType(TYPE_MONSTER)
end
function s.ffilter2(c)
return c:IsType(TYPE_FIELD)
end
function s.fselect(g)
return g:GetClassCount(Card.GetCode)==2 and g:IsExists(Card.IsLocation,1,nil,LOCATION_ONFIELD) and g:IsExists(Card.IsLocation,1,nil,LOCATION_GRAVE)
end
function s.splimit(e,se,sp,st)
return not e:GetHandler():IsLocation(LOCATION_EXTRA)
end
function s.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local fg=Duel.GetMatchingGroup(s.ffilter,tp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
return fg:CheckSubGroup(s.fselect,2,2) and Duel.GetMatchingGroupCount(s.ffilter2,p,LOCATION_GRAVE,0,nil)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local cp=c:GetControler()
local g=Duel.GetMatchingGroup(s.ffilter,cp,LOCATION_ONFIELD+LOCATION_GRAVE,0,nil)
Duel.Hint(HINT_SELECTMSG,cp,HINTMSG_REMOVE)
local sg=g:SelectSubGroup(cp,s.fselect,true,2,2)
if sg then
sg:KeepAlive()
e:SetLabelObject(sg)
return true
else return false end
end
function s.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_FIELD)>=1
function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
local sg=e:GetLabelObject()
c:SetMaterial(sg)
Duel.Remove(sg,POS_FACEUP,REASON_COST)
end
function s.sprfilter(c)
return c:IsFaceup() and c:IsType(TYPE_FIELD)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,LOCATION_FZONE,1,nil)
end
function s.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(Card.IsType,tp,0,LOCATION_ONFIELD,nil,TYPE_MONSTER)
if chk==0 then return #g>0 end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
-- 目标选择
function s.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
-- 检查升级条件
local cond1=Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_FZONE,0,1,nil)
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_FZONE,1,nil)
local cond2=Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_FIELD)
if cond1 or cond2 then
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
e:SetLabel(1) -- 标记为除外
else
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
e:SetLabel(0) -- 标记为破坏
end
end
function s.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,0,LOCATION_ONFIELD,1,1,nil,TYPE_MONSTER)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
if e:GetLabel()==1 then
-- 当满足升级条件时,让玩家选择破坏或除外
local op=Duel.SelectOption(tp,
aux.Stringid(id,2), -- 破坏
aux.Stringid(id,3)) -- 除外
if op==0 then
Duel.Destroy(tc,REASON_EFFECT) -- 选择破坏
else
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) -- 选择除外
end
else
Duel.Destroy(tc,REASON_EFFECT) -- 不满足条件时默认破坏
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
-- 发动条件:从场上送墓或除外
function s.spcon1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousLocation(LOCATION_ONFIELD)
end
-- 目标处理
function s.spfilter(c,e,tp)
return c:IsSetCard(0x1ad) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsLevelBelow(8)
return c:IsSetCard(0x1ad) and c:IsLevelBelow(8) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA+LOCATION_DECK)
function s.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK+LOCATION_EXTRA)
end
function s.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,s.spfilter,tp,LOCATION_EXTRA+LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
-- 效果处理
function s.spop1(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,s.spfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil,e,tp)
if #g>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
\ No newline at end of file
......@@ -2,22 +2,42 @@
local s,id,o=GetID()
function s.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetDescription(aux.Stringid(id,2))
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetTarget(s.target)
e1:SetOperation(s.activate)
e1:SetTarget(s.drtg)
e1:SetOperation(s.drop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,id)
e2:SetCost(aux.bfgcost)
e2:SetTarget(s.settg)
e2:SetOperation(s.setop)
e2:SetDescription(aux.Stringid(id,3))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e2:SetTarget(s.postg)
e2:SetOperation(s.posop)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,4))
e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetTarget(s.rmtg)
e3:SetOperation(s.rmop)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(id,1))
e4:SetType(EFFECT_TYPE_IGNITION)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1,id)
e4:SetCost(aux.bfgcost)
e4:SetTarget(s.settg)
e4:SetOperation(s.setop)
c:RegisterEffect(e4)
end
function s.dsfilter(c)
return c:IsSetCard(0x1a4) and c:IsDiscardable(REASON_EFFECT)
......@@ -37,64 +57,49 @@ end
function s.rmfilter(c,turn)
return c:IsFacedown() and c:IsAbleToRemove()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end
local res1=Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(s.dsfilter,tp,LOCATION_HAND,0,1,e:GetHandler())
local res2=(Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,e:GetHandler()) or Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()))
and Duel.IsExistingTarget(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
local res3=Duel.IsExistingMatchingCard(s.cfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD,1,nil)
if chk==0 then return res1 or res2 or res3 end
local op=0
if res1 and res2 then
op=aux.SelectFromOptions(tp,
{res1,aux.Stringid(id,2),1},
{res2,aux.Stringid(id,3),2},
{res3,aux.Stringid(id,4),3})
function s.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,2)
and Duel.IsExistingMatchingCard(s.dsfilter,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function s.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.DiscardHand(tp,s.dsfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
e:SetLabel(op)
if op==1 then
e:SetCategory(CATEGORY_DRAW)
e:SetProperty(0)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
elseif op==2 then
e:SetCategory(CATEGORY_POSITION)
e:SetProperty(EFFECT_FLAG_CARD_TARGET)
if Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,e:GetHandler()) then
if not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) or Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
end
function s.postg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and s.posfilter(chkc) end
if chk==0 then return (Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,e:GetHandler()) or Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()))
and Duel.IsExistingTarget(s.posfilter,tp,0,LOCATION_MZONE,1,nil) end
if Duel.IsExistingMatchingCard(s.cfilter1,tp,LOCATION_HAND,0,1,e:GetHandler()) then
if not Duel.IsExistingMatchingCard(s.cfilter2,tp,LOCATION_ONFIELD,0,1,e:GetHandler()) or Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g=Duel.SelectMatchingCard(tp,s.cfilter1,tp,LOCATION_HAND,0,1,1,nil)
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleHand(tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
elseif op==3 then
e:SetCategory(CATEGORY_REMOVE)
e:SetProperty(0)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,s.posfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==1 then
if Duel.DiscardHand(tp,s.dsfilter,1,1,REASON_EFFECT+REASON_DISCARD,nil)~=0 then
Duel.BreakEffect()
Duel.Draw(tp,2,REASON_EFFECT)
end
elseif e:GetLabel()==2 then
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
else
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
function s.posop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsLocation(LOCATION_MZONE) and tc:IsFaceup() then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
end
end
function s.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.cfilter3,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil)
and Duel.IsExistingMatchingCard(s.rmfilter,tp,0,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function s.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(s.rmfilter,tp,0,LOCATION_ONFIELD,nil)
if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function s.setfilter(c)
......@@ -108,12 +113,12 @@ function s.setop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(s.setfilter),tp,LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil)
local tc=g:GetFirst()
if tc and Duel.SSet(tp,tc)~=0 then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(id,5))
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetDescription(aux.Stringid(id,5))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_SET_TURN)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3)
end
end
\ No newline at end of file
--神之配告
function c1994420.initial_effect(c)
-- summon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCost(c1994420.cost)
e1:SetCode(EVENT_SPSUMMON)
e1:SetCondition(c1994420.condition)
e1:SetTarget(c1994420.target)
e1:SetOperation(c1994420.activate)
c:RegisterEffect(e1)
-- summon effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c1994420.condition1)
e2:SetCost(c1994420.cost1)
e2:SetTarget(c1994420.target1)
e2:SetOperation(c1994420.activate1)
c:RegisterEffect(e2)
--act in hand
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(1994420,0))
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e3:SetCondition(c1994420.handcon)
c:RegisterEffect(e3)
end
function c1994420.espcfilter(c,tp)
return c:IsPreviousLocation(LOCATION_EXTRA)
end
function c1994420.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c1994420.espcfilter,1,nil,tp)
end
function c1994420.handcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==0
end
function c1994420.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,1500)
end
end
function c1994420.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE_SUMMON,eg,eg:GetCount(),0,0)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,eg:GetCount(),0,0)
end
function c1994420.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
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(c1994420.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
function c1994420.splimit(e,c,sump,sumtype,sumpos,targetp,se)
return c:IsLocation(LOCATION_EXTRA)
end
function c1994420.condition1(e,tp,eg,ep,ev,re,r,rp)
if not Duel.IsChainNegatable(ev) then return false end
if not re:IsActiveType(TYPE_MONSTER) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
return re:IsHasCategory(CATEGORY_SPECIAL_SUMMON)
end
function c1994420.cost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,1000) end
Duel.PayLPCost(tp,1000)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
Duel.PayLPCost(tp,1500)
end
end
function c1994420.target1(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)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
end
function c1994420.activate1(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
if e:GetHandler():IsStatus(STATUS_ACT_FROM_HAND) then
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(c1994420.splimit)
e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp)
end
end
end
\ No newline at end of file
This diff is collapsed.
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