Commit da3b627f authored by argon.sun's avatar argon.sun

tag

parent a349882a
--メガキャノン·ソルジャー
function c14702066.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(14702066,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c14702066.cost)
e1:SetTarget(c14702066.target)
e1:SetOperation(c14702066.operation)
c:RegisterEffect(e1)
end
function c14702066.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,2,nil) end
local sg=Duel.SelectReleaseGroup(tp,nil,2,2,nil)
Duel.Release(sg,REASON_COST)
end
function c14702066.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(1500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,1500)
end
function c14702066.operation(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--ポルターガイスト
function c15866454.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetTarget(c15866454.target)
e1:SetOperation(c15866454.activate)
c:RegisterEffect(e1)
end
function c15866454.filter(c)
return c:IsAbleToHand() and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function c15866454.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c15866454.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c15866454.filter,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c15866454.filter,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c15866454.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--燃えさかる大地
function c24294108.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetOperation(c24294108.activate)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(24294108,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_REPEAT)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetRange(LOCATION_SZONE)
e2:SetCountLimit(1)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetTarget(c24294108.damtg)
e2:SetOperation(c24294108.damop)
c:RegisterEffect(e2)
end
function c24294108.activate(e,tp,eg,ep,ev,re,r,rp)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) end
if g:GetCount()>0 then
Duel.Destroy(g,REASON_EFFECT)
end
end
function c24294108.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local cp=Duel.GetTurnPlayer()
Duel.SetTargetPlayer(cp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,cp,500)
end
function c24294108.damop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--ソーラーレイ
function c44472639.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c1)
e1:SetTarget(c44472639.target)
e1:SetOperation(c44472639.activate)
c:RegisterEffect(e1)
end
function c44472639.filter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsFaceup()
end
function c44472639.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c44472639.filter,tp,LOCATION_MZONE,0,1,nil) end
local dam=Duel.GetMatchingGroupCount(c44472639.filter,tp,LOCATION_MZONE,0,nil)*600
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,dam)
end
function c44472639.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local dam=Duel.GetMatchingGroupCount(c44472639.filter,tp,LOCATION_MZONE,0,nil)*600
Duel.Damage(p,dam,REASON_EFFECT)
end
--Hieratic Seal From the Ashes
function c53670497.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c53670497.target1)
e1:SetOperation(c53670497.activate)
c:RegisterEffect(e1)
--instant
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(53670497,1))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMING_END_PHASE)
e2:SetLabel(1)
e2:SetTarget(c53670497.target2)
e2:SetOperation(c53670497.activate)
c:RegisterEffect(e2)
--spsummmon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(53670497,2))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_TRIGGER_F+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c53670497.spcon)
e3:SetTarget(c53670497.sptg)
e3:SetOperation(c53670497.spop)
c:RegisterEffect(e3)
end
function c53670497.filter1(c)
return c:IsSetCard(0x69) and c:IsType(TYPE_MONSTER) and c:IsAbleToGrave()
end
function c53670497.filter2(c)
return c:IsSetCard(0x69) and c:IsType(TYPE_MONSTER)
end
function c53670497.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(0)
local turnp=Duel.GetTurnPlayer()
if ((turnp~=tp and Duel.IsExistingMatchingCard(c53670497.filter1,tp,LOCATION_DECK,0,1,nil))
or (turnp==tp and Duel.IsExistingMatchingCard(c53670497.filter2,tp,LOCATION_REMOVED,0,1,nil)))
and Duel.SelectYesNo(tp,aux.Stringid(53670497,0)) then
if turnp==tp then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
e:SetLabel(1)
e:GetHandler():RegisterFlagEffect(53670497,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c53670497.target2(e,tp,eg,ep,ev,re,r,rp,chk)
local turnp=Duel.GetTurnPlayer()
if chk==0 then return e:GetHandler():GetFlagEffect(53670497)==0
and ((turnp~=tp and Duel.IsExistingMatchingCard(c53670497.filter1,tp,LOCATION_DECK,0,1,nil))
or (turnp==tp and Duel.IsExistingMatchingCard(c53670497.filter2,tp,LOCATION_REMOVED,0,1,nil))) end
if turnp==tp then
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_REMOVED)
else
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
e:GetHandler():RegisterFlagEffect(53670497,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c53670497.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()~=1 or not c:IsRelateToEffect(e) then return end
local turnp=Duel.GetTurnPlayer()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
if turnp~=tp then
local g=Duel.SelectMatchingCard(tp,c53670497.filter1,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT)
else
local g=Duel.SelectMatchingCard(tp,c53670497.filter2,tp,LOCATION_REMOVED,0,1,1,nil)
Duel.SendtoGrave(g,REASON_EFFECT+REASON_RETURN)
end
end
function c53670497.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousLocation(LOCATION_ONFIELD)
end
function c53670497.filter(c,e,tp)
return c:IsSetCard(0x69) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c53670497.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c53670497.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c53670497.filter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c53670497.filter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c53670497.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end
end
--ドイツ
function c57062206.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(57062206,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c57062206.eqtg)
e1:SetOperation(c57062206.eqop)
c:RegisterEffect(e1)
--unequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(57062206,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c57062206.uncon)
e2:SetTarget(c57062206.sptg)
e2:SetOperation(c57062206.spop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(2500)
e3:SetCondition(c57062206.uncon)
c:RegisterEffect(e3)
--destroy sub
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e5:SetCondition(c57062206.uncon)
e5:SetValue(c57062206.repval)
c:RegisterEffect(e5)
--eqlimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(c57062206.eqlimit)
c:RegisterEffect(e6)
end
function c57062206.uncon(e)
return e:GetHandler():IsStatus(STATUS_UNION)
end
function c57062206.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c57062206.eqlimit(e,c)
return c:IsCode(60246171)
end
function c57062206.filter(c)
return c:IsFaceup() and c:IsCode(60246171) and c:GetUnionCount()==0
end
function c57062206.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c57062206.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c57062206.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c57062206.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c57062206.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c57062206.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
c:SetStatus(STATUS_UNION,true)
end
function c57062206.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(57062206)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(57062206,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c57062206.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end
end
--対空放花
function c65064143.initial_effect(c)
--damage
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(65064143,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(c65064143.damcost)
e1:SetTarget(c65064143.damtg)
e1:SetOperation(c65064143.damop)
c:RegisterEffect(e1)
end
function c65064143.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,Card.IsRace,1,nil,RACE_INSECT) end
local g=Duel.SelectReleaseGroup(tp,Card.IsRace,1,1,nil,RACE_INSECT)
Duel.Release(g,REASON_COST)
end
function c65064143.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(800)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,800)
end
function c65064143.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--棺桶売り
function c65830223.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65830223,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c65830223.condition)
e2:SetTarget(c65830223.target)
e2:SetOperation(c65830223.operation)
c:RegisterEffect(e2)
end
function c65830223.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:GetControler()==1-tp
end
function c65830223.condition(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c65830223.filter,1,nil,tp)
end
function c65830223.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(300)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,1-tp,300)
end
function c65830223.operation(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
--コイツ
function c69456283.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(69456283,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c69456283.eqtg)
e1:SetOperation(c69456283.eqop)
c:RegisterEffect(e1)
--unequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(69456283,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c69456283.uncon)
e2:SetTarget(c69456283.sptg)
e2:SetOperation(c69456283.spop)
c:RegisterEffect(e2)
--atk up
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetValue(3000)
e3:SetCondition(c69456283.uncon)
c:RegisterEffect(e3)
--pierce
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_EQUIP)
e4:SetCode(EFFECT_PIERCE)
e4:SetCondition(c69456283.uncon)
c:RegisterEffect(e4)
--destroy sub
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_EQUIP)
e5:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e5:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e5:SetCondition(c69456283.uncon)
e5:SetValue(c69456283.repval)
c:RegisterEffect(e5)
--eqlimit
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_SINGLE)
e6:SetCode(EFFECT_EQUIP_LIMIT)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e6:SetValue(c69456283.eqlimit)
c:RegisterEffect(e6)
end
function c69456283.uncon(e)
return e:GetHandler():IsStatus(STATUS_UNION)
end
function c69456283.repval(e,re,r,rp)
return bit.band(r,REASON_BATTLE)~=0
end
function c69456283.eqlimit(e,c)
return c:IsCode(48202661)
end
function c69456283.filter(c)
return c:IsFaceup() and c:IsCode(48202661) and c:GetUnionCount()==0
end
function c69456283.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c69456283.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c69456283.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c69456283.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c69456283.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if not c:IsRelateToEffect(e) or c:IsFacedown() then return end
if not tc:IsRelateToEffect(e) or not c69456283.filter(tc) then
Duel.SendtoGrave(c,REASON_EFFECT)
return
end
if not Duel.Equip(tp,c,tc,false) then return end
c:SetStatus(STATUS_UNION,true)
end
function c69456283.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(69456283)==0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,true,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
e:GetHandler():RegisterFlagEffect(69456283,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c69456283.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_ATTACK)
end
end
--ナーガ
function c71829750.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(71829750,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_NAGA)
e1:SetCode(EVENT_TO_DECK)
e1:SetCondition(c71829750.spcon)
e1:SetTarget(c71829750.sptg)
e1:SetOperation(c71829750.spop)
c:RegisterEffect(e1)
end
function c71829750.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousPosition(POS_FACEUP)
and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c71829750.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c71829750.spfilter(c,e,tp)
return c:IsLevelBelow(3) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c71829750.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c71829750.spfilter,tp,LOCATION_DECK,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--カオス·マジシャン
function c72630549.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetTarget(c72630549.distg)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c72630549.disop)
c:RegisterEffect(e2)
end
function c72630549.distg(e,c)
if c:GetCardTargetCount()~=1 then return false end
return c:GetFirstCardTarget()==e:GetHandler()
end
function c72630549.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_EFFECT) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()~=1 then return end
if g:GetFirst()==e:GetHandler() then
Duel.NegateEffect(ev)
end
end
--黒曜岩竜
function c90464188.initial_effect(c)
--disable
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c90464188.distg)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetOperation(c90464188.disop)
c:RegisterEffect(e2)
--self destroy
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SELF_DESTROY)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e3:SetTarget(c90464188.distg)
c:RegisterEffect(e3)
end
function c90464188.distg(e,c)
if c:GetCardTargetCount()==0 then return false end
return c:GetCardTarget():IsExists(c90464188.disfilter,1,nil,e:GetHandlerPlayer())
end
function c90464188.disfilter(c,tp)
return c:IsControler(tp) and c:IsFaceup() and c:IsLocation(LOCATION_MZONE) and c:IsAttribute(ATTRIBUTE_DARK)
end
function c90464188.disop(e,tp,eg,ep,ev,re,r,rp)
if not re:IsActiveType(TYPE_SPELL+TYPE_TRAP) then return end
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
if not g or g:GetCount()==0 then return end
if g:IsExists(c90464188.disfilter,1,nil,tp) then
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(re:GetHandler(),REASON_EFFECT)
end
end
end
--死霊の誘い
function c98139712.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_SZONE)
e2:SetOperation(c98139712.operation)
c:RegisterEffect(e2)
end
function c98139712.filter1(c,tp)
return c:GetOwner()==1-tp
end
function c98139712.filter2(c,tp)
return c:GetOwner()==tp
end
function c98139712.operation(e,tp,eg,ep,ev,re,r,rp)
local d1=eg:FilterCount(c98139712.filter1,nil,tp)*300
local d2=eg:FilterCount(c98139712.filter2,nil,tp)*300
Duel.Damage(1-tp,d1,REASON_EFFECT)
Duel.Damage(tp,d2,REASON_EFFECT)
end
--ホーリー·エルフの祝福
function c98299011.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c1)
e1:SetTarget(c98299011.target)
e1:SetOperation(c98299011.activate)
c:RegisterEffect(e1)
end
function c98299011.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)>0 end
local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,rec)
end
function c98299011.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local rec=Duel.GetFieldGroupCount(tp,LOCATION_MZONE,LOCATION_MZONE)*300
Duel.Recover(p,rec,REASON_EFFECT)
end
--Xyz Wrath
function c99064191.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c99064191.target1)
e1:SetOperation(c99064191.activate1)
c:RegisterEffect(e1)
--instant(chain)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99064191,0))
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_CHAINING)
e2:SetCondition(c99064191.condition2)
e2:SetCost(c99064191.cost2)
e2:SetTarget(c99064191.target2)
e2:SetOperation(c99064191.activate2)
c:RegisterEffect(e2)
end
function c99064191.cfilter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
end
function c99064191.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
e:SetLabel(0)
local ct=Duel.GetCurrentChain()
if ct==1 or not Duel.IsExistingMatchingCard(c99064191.cfilter,tp,LOCATION_MZONE,0,1,nil)
or not Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) then return false end
local pe=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
local tc=pe:GetHandler()
if pe:IsActiveType(TYPE_EFFECT) and tc:IsLevelAbove(5)
and Duel.IsChainDisablable(ct-1) and Duel.SelectYesNo(tp,aux.Stringid(99064191,1)) then
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,tc,1,0,0)
if tc:IsDestructable() and tc:IsRelateToEffect(pe) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tc,1,0,0)
end
e:SetLabel(1)
e:GetHandler():RegisterFlagEffect(99064191,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
end
function c99064191.activate1(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if e:GetLabel()~=1 or not c:IsRelateToEffect(e) then return end
local ct=Duel.GetChainInfo(0,CHAININFO_CHAIN_COUNT)
local te=Duel.GetChainInfo(ct-1,CHAININFO_TRIGGERING_EFFECT)
local tc=te:GetHandler()
if Duel.NegateEffect(ct-1) and tc:IsRelateToEffect(te) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c99064191.condition2(e,tp,eg,ep,ev,re,r,rp,chk)
return Duel.IsExistingMatchingCard(c99064191.cfilter,tp,LOCATION_MZONE,0,1,nil)
and re:IsActiveType(TYPE_EFFECT) and re:GetHandler():IsLevelAbove(5) and Duel.IsChainDisablable(ev)
end
function c99064191.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST+REASON_DISCARD)
end
function c99064191.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(99064191)==0 end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0)
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0)
end
e:GetHandler():RegisterFlagEffect(99064191,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c99064191.activate2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.NegateEffect(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
end
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