Commit 5d992fee authored by argon.sun's avatar argon.sun

new scripts

parent 5b6b621d
--リターンソウル
function c10537981.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_END_PHASE)
e1:SetCondition(c10537981.condition)
e1:SetTarget(c10537981.target)
e1:SetOperation(c10537981.activate)
c:RegisterEffect(e1)
end
function c10537981.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_END
end
function c10537981.filter(c,tid)
return c:IsReason(REASON_DESTROY) and c:IsType(TYPE_MONSTER) and c:GetTurnID()==tid
and c:IsAbleToDeck()
end
function c10537981.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c10537981.filter(chkc,Duel.GetTurnCount()) end
if chk==0 then return Duel.IsExistingTarget(c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,Duel.GetTurnCount()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c10537981.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,3,nil,Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,g:GetCount(),0,0)
end
function c10537981.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local sg=g:Filter(Card.IsRelateToEffect,nil,e)
if sg:GetCount()>0 then
Duel.SendtoDeck(sg,nil,2,REASON_EFFECT)
end
end
--ヘリオス·トリス·メギストス
function c17286057.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c17286057.hspcon)
e1:SetOperation(c17286057.hspop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c17286057.value)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_DEFENCE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(17286057,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCondition(c17286057.spcon)
e4:SetTarget(c17286057.sptg)
e4:SetOperation(c17286057.spop)
c:RegisterEffect(e4)
--chain attack
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(17286057,1))
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_BATTLE_DESTROYING)
e5:SetCondition(c17286057.atcon)
e5:SetOperation(c17286057.atop)
c:RegisterEffect(e5)
end
function c17286057.hspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,80887952)
end
function c17286057.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,80887952)
Duel.Release(g,REASON_COST)
end
function c17286057.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c17286057.value(e,c)
return Duel.GetMatchingGroupCount(c17286057.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*300
end
function c17286057.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount()
end
function c17286057.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 c17286057.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(500)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
function c17286057.atcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>0 and e:GetHandler():IsChainAttackable()
end
function c17286057.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
--黄金のホムンクルス
function c27408609.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(c27408609.value)
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_UPDATE_DEFENCE)
e2:SetValue(c27408609.value)
c:RegisterEffect(e2)
end
function c27408609.value(e,c)
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_REMOVED,0)*300
end
--デス·モスキート
function c33695750.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(33695750,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c33695750.addct)
e1:SetOperation(c33695750.addc)
c:RegisterEffect(e1)
--attackup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c33695750.attackup)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c33695750.reptg)
c:RegisterEffect(e3)
end
function c33695750.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x27)
end
function c33695750.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x27,2)
end
end
function c33695750.attackup(e,c)
return c:GetCounter(0x27)*500
end
function c33695750.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_BATTLE)
and e:GetHandler():IsCanRemoveCounter(tp,0x27,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x27,1,REASON_EFFECT)
return true
end
--ダメージ·ポラリライザー
function c46031686.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c46031686.condition)
e1:SetTarget(c46031686.target)
e1:SetOperation(c46031686.activate)
c:RegisterEffect(e1)
end
function c46031686.condition(e,tp,eg,ep,ev,re,r,rp)
local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c46031686.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp) and Duel.IsPlayerCanDraw(1-tp,1) 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
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,PLAYER_ALL,1)
end
function c46031686.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
Duel.Draw(tp,1,REASON_EFFECT)
Duel.Draw(1-tp,1,REASON_EFFECT)
end
--ヘル·ドラゴン
function c47754278.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(47754278,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_REPEAT)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c47754278.descon)
e1:SetTarget(c47754278.destg)
e1:SetOperation(c47754278.desop)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(47754278,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c47754278.spcon)
e2:SetCost(c47754278.spcost)
e2:SetTarget(c47754278.sptg)
e2:SetOperation(c47754278.spop)
c:RegisterEffect(e2)
end
function c47754278.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetAttackAnnouncedCount()~=0
end
function c47754278.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end
function c47754278.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
function c47754278.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_DESTROY) and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c47754278.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c47754278.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c47754278.spop(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)
end
end
--カオス·バースト
function c4923662.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY+CATEGORY_DAMAGE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c4923662.condition)
e1:SetCost(c4923662.cost)
e1:SetTarget(c4923662.target)
e1:SetOperation(c4923662.activate)
c:RegisterEffect(e1)
end
function c4923662.condition(e,tp,eg,ep,ev,re,r,rp)
return tp~=Duel.GetTurnPlayer()
end
function c4923662.cost(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.CheckReleaseGroup(tp,nil,1,nil) end
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c4923662.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tg=Duel.GetAttacker()
if chkc then return chkc==tg end
if chk==0 then return tg:IsOnField() and tg:IsDestructable() and tg:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
end
function c4923662.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsAttackable() and not tc:IsStatus(STATUS_ATTACK_CANCELED)
and Duel.Destroy(tc,REASON_EFFECT) then
Duel.BreakEffect()
Duel.Damage(1-tp,1000,REASON_EFFECT)
end
end
--融合破棄
function c49469105.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c49469105.cost)
e1:SetTarget(c49469105.target)
e1:SetOperation(c49469105.operation)
c:RegisterEffect(e1)
end
function c49469105.cfilter(c)
return c:IsCode(24094653) and c:IsDiscardable() and c:IsAbleToGraveAsCost()
end
function c49469105.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c49469105.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c49469105.cfilter,1,1,REASON_COST+REASON_DISCARD)
end
function c49469105.filter2(c,fc)
local fd=c:GetCode()
for i=1,fc.material_count do
if fd==fc.material[i] then return true end
end
return false
end
function c49469105.filter1(c,g)
local ct=c.material_count
return ct~=nil and g:IsExists(c49469105.filter2,1,nil,c)
end
function c49469105.spfilter(c,e,tp)
return c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c49469105.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c49469105.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c49469105.filter1,tp,LOCATION_EXTRA,0,1,nil,g) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c49469105.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local g=Duel.GetMatchingGroup(c49469105.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local exg=Duel.SelectMatchingCard(tp,c49469105.filter1,tp,LOCATION_EXTRA,0,1,1,nil,g)
if exg:GetCount()>0 then
Duel.SendtoGrave(exg,REASON_EFFECT)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:FilterSelect(tp,c49469105.filter2,1,1,nil,exg:GetFirst())
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetOperation(c49469105.tgop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetCountLimit(1)
sg:GetFirst():RegisterEffect(e1,true)
end
end
function c49469105.tgop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)
end
......@@ -7,15 +7,13 @@ function c54493213.initial_effect(c)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetValue(c54493213.value)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(c54493213.value)
c:RegisterEffect(e2)
end
function c54493213.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c54493213.value(e,c)
return Duel.GetMatchingGroupCount(Card.IsType,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil,TYPE_MONSTER)*100
return Duel.GetMatchingGroupCount(c54493213.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*100
end
--グラヴィティ·ベヒモス
function c56931015.initial_effect(c)
--summon with no tribute
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(56931015,0))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SUMMON_PROC)
e1:SetCondition(c56931015.ntcon)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(56931015,1))
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c56931015.descost)
e2:SetTarget(c56931015.destg)
e2:SetOperation(c56931015.desop)
c:RegisterEffect(e2)
end
function c56931015.ntcon(e,c)
if c==nil then return true end
return c:GetLevel()>4 and Duel.GetTurnCount()~=1 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
and Duel.GetFieldGroupCount(c:GetControler(),LOCATION_ONFIELD,LOCATION_ONFIELD)==0
end
function c56931015.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetAttackAnnouncedCount()==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_OATH)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e:GetHandler():RegisterEffect(e1)
end
function c56931015.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local c1=Duel.GetFieldCard(0,LOCATION_SZONE,5)
local c2=Duel.GetFieldCard(1,LOCATION_SZONE,5)
if chk==0 then return (c1 and c1:IsDestructable()) or (c2 and c2:IsDestructable()) end
local g=Group.CreateGroup()
if c1 and c1:IsDestructable() then g:AddCard(c1) end
if c2 and c2:IsDestructable() then g:AddCard(c2) end
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c56931015.desop(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 c61802346.initial_effect(c)
--
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(61802346,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(c61802346.target)
e1:SetOperation(c61802346.operation)
c:RegisterEffect(e1)
end
function c61802346.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)
Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,1,nil)
end
function c61802346.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_CHANGE_POSITION)
e2:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,2)
tc:RegisterEffect(e2)
end
end
--メタル·シューター
function c7200041.initial_effect(c)
--summon success
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(7200041,0))
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetTarget(c7200041.addct)
e1:SetOperation(c7200041.addc)
c:RegisterEffect(e1)
--attackup
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetValue(c7200041.attackup)
c:RegisterEffect(e2)
--destroy replace
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e3:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetRange(LOCATION_MZONE)
e3:SetTarget(c7200041.reptg)
c:RegisterEffect(e3)
end
function c7200041.addct(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_COUNTER,nil,1,0,0x26)
end
function c7200041.addc(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) then
e:GetHandler():AddCounter(0x26,2)
end
end
function c7200041.attackup(e,c)
return c:GetCounter(0x26)*800
end
function c7200041.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_EFFECT)
and e:GetHandler():IsCanRemoveCounter(tp,0x26,1,REASON_COST) end
e:GetHandler():RemoveCounter(tp,0x26,1,REASON_EFFECT)
return true
end
--カイザー·サクリファイス
function c72237166.initial_effect(c)
--to hand
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(72237166,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_RELEASE)
e1:SetCondition(c72237166.retcon)
e1:SetTarget(c72237166.rettg)
e1:SetOperation(c72237166.retop)
c:RegisterEffect(e1)
end
function c72237166.retcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_SUMMON)
end
function c72237166.rettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,e:GetHandler(),1,0,0)
end
function c72237166.retop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SendtoHand(c,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,c)
end
end
--フュージョン·ガード
function c73026394.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_CHAINING)
e1:SetCondition(c73026394.condition)
e1:SetTarget(c73026394.target)
e1:SetOperation(c73026394.activate)
c:RegisterEffect(e1)
end
function c73026394.condition(e,tp,eg,ep,ev,re,r,rp)
local ex=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
return ex and (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
end
function c73026394.filter(c)
return c:IsType(TYPE_FUSION) and c:IsAbleToGrave()
end
function c73026394.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c73026394.filter,tp,LOCATION_EXTRA,0,1,nil) 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 c73026394.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
local g=Duel.GetMatchingGroup(c73026394.filter,tp,LOCATION_EXTRA,0,nil):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
end
--無情の抹殺
function c73148972.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOGRAVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c73148972.target)
e1:SetOperation(c73148972.activate)
c:RegisterEffect(e1)
end
function c73148972.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) end
if chk==0 then return Duel.IsExistingTarget(nil,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
end
function c73148972.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsControler(tp) then
Duel.SendtoGrave(tc,REASON_EFFECT)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND):RandomSelect(tp,1)
Duel.SendtoGrave(g,REASON_EFFECT)
end
end
--ヘリオス·デュオ·メギストス
function c80887952.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c80887952.hspcon)
e1:SetOperation(c80887952.hspop)
c:RegisterEffect(e1)
--atk/def
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE)
e2:SetCode(EFFECT_SET_ATTACK)
e2:SetValue(c80887952.value)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EFFECT_SET_DEFENCE)
c:RegisterEffect(e3)
--spsummon
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(80887952,0))
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_PHASE+PHASE_END)
e4:SetRange(LOCATION_GRAVE)
e4:SetCountLimit(1)
e4:SetCondition(c80887952.spcon)
e4:SetTarget(c80887952.sptg)
e4:SetOperation(c80887952.spop)
c:RegisterEffect(e4)
end
function c80887952.hspcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and Duel.CheckReleaseGroup(c:GetControler(),Card.IsCode,1,nil,54493213)
end
function c80887952.hspop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.SelectReleaseGroup(tp,Card.IsCode,1,1,nil,54493213)
Duel.Release(g,REASON_COST)
end
function c80887952.filter(c)
return c:IsFaceup() and c:IsType(TYPE_MONSTER)
end
function c80887952.value(e,c)
return Duel.GetMatchingGroupCount(c80887952.filter,c:GetControler(),LOCATION_REMOVED,LOCATION_REMOVED,nil)*200
end
function c80887952.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsReason(REASON_BATTLE) and e:GetHandler():GetTurnID()==Duel.GetTurnCount()
end
function c80887952.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 c80887952.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SpecialSummonStep(c,0,tp,tp,false,false,POS_FACEUP) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(300)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
c:RegisterEffect(e2)
end
Duel.SpecialSummonComplete()
end
--ブレイン·クラッシャー
function c81919143.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(81919143,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c81919143.spcon)
e1:SetTarget(c81919143.sptg)
e1:SetOperation(c81919143.spop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_BATTLE_DESTROYING)
e2:SetOperation(c81919143.regop)
c:RegisterEffect(e2)
end
function c81919143.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(81919143,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c81919143.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(81919143)~=0
end
function c81919143.filter(c,e,tp,rc,tid)
return c:IsReason(REASON_BATTLE) and c:GetReasonCard()==rc and c:GetTurnID()==tid
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c81919143.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and c81919143.filter(chkc,e,tp,e:GetHandler(),Duel.GetTurnCount()) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c81919143.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c81919143.filter,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,1,nil,e,tp,e:GetHandler(),Duel.GetTurnCount())
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,g:GetCount(),0,0)
end
function c81919143.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 c84177693.initial_effect(c)
--recover
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(84177693,0))
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c84177693.reccon)
e1:SetTarget(c84177693.rectg)
e1:SetOperation(c84177693.recop)
c:RegisterEffect(e1)
end
function c84177693.reccon(e,tp,eg,ep,ev,re,r,rp)
return not e:GetHandler():IsReason(REASON_BATTLE)
and Duel.GetEnvironment()==56433456
end
function c84177693.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1000)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,1000)
end
function c84177693.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Recover(p,d,REASON_EFFECT)
end
--アーマー·ブレイカー
function c87798440.initial_effect(c)
--equip
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(87798440,0))
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCategory(CATEGORY_EQUIP)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetTarget(c87798440.eqtg)
e1:SetOperation(c87798440.eqop)
c:RegisterEffect(e1)
--unequip
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(87798440,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_SZONE)
e2:SetCondition(c87798440.uncon)
e2:SetTarget(c87798440.sptg)
e2:SetOperation(c87798440.spop)
c:RegisterEffect(e2)
--destroy sub
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_EQUIP)
e3:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e3:SetCode(EFFECT_DESTROY_SUBSTITUTE)
e3:SetCondition(c87798440.uncon)
e3:SetValue(1)
c:RegisterEffect(e3)
--draw
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(87798440,2))
e4:SetCategory(CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_BATTLE_DAMAGE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetRange(LOCATION_SZONE)
e4:SetCondition(c87798440.descon)
e4:SetTarget(c87798440.destg)
e4:SetOperation(c87798440.desop)
c:RegisterEffect(e4)
--eqlimit
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_SINGLE)
e5:SetCode(EFFECT_EQUIP_LIMIT)
e5:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e5:SetValue(c87798440.eqlimit)
c:RegisterEffect(e5)
end
function c87798440.uncon(e)
return e:GetHandler():IsStatus(STATUS_UNION)
end
function c87798440.eqlimit(e,c)
return c:IsRace(RACE_WARRIOR)
end
function c87798440.filter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR) and c:GetUnionCount()==0
end
function c87798440.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c87798440.filter(chkc) end
if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c87798440.filter,tp,LOCATION_MZONE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectTarget(tp,c87798440.filter,tp,LOCATION_MZONE,0,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_EQUIP,g,1,0,0)
e:GetHandler():RegisterFlagEffect(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c87798440.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 c87798440.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 c87798440.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(87798440)==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(87798440,RESET_EVENT+0x7e0000+RESET_PHASE+PHASE_END,0,1)
end
function c87798440.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)
end
end
function c87798440.descon(e,tp,eg,ep,ev,re,r,rp)
return ep~=tp and e:GetHandler():GetEquipTarget()==eg:GetFirst()
end
function c87798440.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsDestructable() end
if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c87798440.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
......@@ -404,3 +404,5 @@
!counter 0x23 海洋指示物
!counter 0x24 弦指示物
!counter 0x25 年代记指示物
!counter 0x26 指示物(金属射手)
!counter 0x26 指示物(死亡蚊)
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