Commit a699b7e0 authored by VanillaSalt's avatar VanillaSalt

new

parent f2741988
--運命の扉
function c27062594.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(c27062594.condition)
e1:SetTarget(c27062594.target)
e1:SetOperation(c27062594.activate)
c:RegisterEffect(e1)
end
function c27062594.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c27062594.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,27062594,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c27062594.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if not c:IsRelateToEffect(e)
or not Duel.IsPlayerCanSpecialSummonMonster(tp,27062594,0,0x21,0,0,1,RACE_FIEND,ATTRIBUTE_LIGHT) then return end
c:AddTrapMonsterAttribute(TYPE_EFFECT,ATTRIBUTE_LIGHT,RACE_FIEND,1,0,0)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP)
c:TrapMonsterBlock()
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(27062594,0))
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCondition(c27062594.damcon)
e1:SetCost(c27062594.damcost)
e1:SetTarget(c27062594.damtg)
e1:SetOperation(c27062594.damop)
e1:SetReset(RESET_EVENT+0x1fe0000)
c:RegisterEffect(e1)
end
function c27062594.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function c27062594.cfilter(c)
return c:IsSetCard(0x7f) and c:IsAbleToRemoveAsCost()
end
function c27062594.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c27062594.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
local g=Duel.GetMatchingGroup(c27062594.cfilter,tp,LOCATION_GRAVE,0,nil)
local rg=Group.CreateGroup()
repeat
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=g:Select(tp,1,1,nil)
g:Remove(Card.IsCode,nil,sg:GetFirst())
rg:Merge(sg)
until g:GetCount()==0 or not Duel.SelectYesNo(tp,aux.Stringid(27062594,1))
local ct=Duel.Remove(rg,POS_FACEUP,REASON_COST)
e:SetLabel(ct)
end
function c27062594.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(e:GetLabel()*500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,e:GetLabel()*500)
end
function c27062594.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local val=Duel.Damage(p,d,REASON_EFFECT)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(val)
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
end
end
--びっくり箱
function c31077447.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCondition(c31077447.condition)
e1:SetTarget(c31077447.target)
e1:SetOperation(c31077447.activate)
c:RegisterEffect(e1)
end
function c31077447.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)>1
end
function c31077447.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=Duel.GetAttacker()
if chkc then return chkc==tc end
if chk==0 then return tc:IsOnField() and tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end
function c31077447.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not Duel.NegateAttack() then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_MZONE,1,1,tc)
local sc=g:GetFirst()
if sc and Duel.SendtoGrave(sc,REASON_EFFECT)~=0 and sc:IsLocation(LOCATION_GRAVE) then
Duel.BreakEffect()
local val=math.max(0,sc:GetAttack(),sc:GetDefence())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(-val)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
--ナチュルの神星樹
function c3734202.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(3734202,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCost(c3734202.spcost1)
e2:SetTarget(c3734202.sptg1)
e2:SetOperation(c3734202.spop1)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(3734202,1))
e3:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetRange(LOCATION_SZONE)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCost(c3734202.spcost2)
e3:SetTarget(c3734202.sptg2)
e3:SetOperation(c3734202.spop2)
c:RegisterEffect(e3)
--search
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(3734202,2))
e4:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetTarget(c3734202.thtg)
e4:SetOperation(c3734202.thop)
c:RegisterEffect(e4)
end
function c3734202.cfilter1(c)
return c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c3734202.spcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c3734202.cfilter1,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter1,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c3734202.spfilter1(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3734202.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3734202.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c3734202.spop1(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3734202.spfilter1,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 c3734202.cfilter2(c)
return c:IsRace(RACE_PLANT) and c:IsAttribute(ATTRIBUTE_EARTH)
end
function c3734202.spcost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c3734202.cfilter2,1,nil) end
local g=Duel.SelectReleaseGroup(tp,c3734202.cfilter2,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c3734202.spfilter2(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and c:IsAttribute(ATTRIBUTE_EARTH)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c3734202.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c3734202.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK)
end
function c3734202.spop2(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c3734202.spfilter2,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 c3734202.thfilter(c)
return c:IsSetCard(0x2a) and not c:IsCode(3734202) and c:IsAbleToHand()
end
function c3734202.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c3734202.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c3734202.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--異次元の邂逅
function c39900763.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:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetTarget(c39900763.target)
e1:SetOperation(c39900763.operation)
c:RegisterEffect(e1)
end
function c39900763.filter(c,e,tp)
return c:IsFaceup() and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN)
end
function c39900763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c39900763.filter,tp,LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.GetLocationCount(1-tp,LOCATION_MZONE,1-tp)>0
and Duel.IsExistingTarget(c39900763.filter,1-tp,LOCATION_REMOVED,0,1,nil,e,1-tp)
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c39900763.filter,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
e:SetLabelObject(g1:GetFirst())
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_SPSUMMON)
local g2=Duel.SelectTarget(1-tp,c39900763.filter,1-tp,LOCATION_REMOVED,0,1,1,nil,e,1-tp)
g1:Merge(g2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g1,2,0,0)
end
function c39900763.operation(e,tp,eg,ep,ev,re,r,rp)
local tc1=e:GetLabelObject()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
local tc2=g:GetFirst()
if tc1==tc2 then tc2=g:GetNext() end
if tc1:IsRelateToEffect(e) then
Duel.SpecialSummonStep(tc1,0,tp,tp,false,false,POS_FACEDOWN_DEFENCE)
end
if tc2:IsRelateToEffect(e) then
Duel.SpecialSummonStep(tc2,0,1-tp,1-tp,false,false,POS_FACEDOWN_DEFENCE)
end
Duel.SpecialSummonComplete()
end
......@@ -17,7 +17,7 @@ function c48546368.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c48546368.negcon)
e2:SetCost(c48546368.negcost)
e2:SetCost(c48546368.cost)
e2:SetTarget(c48546368.negtg)
e2:SetOperation(c48546368.negop)
c:RegisterEffect(e2)
......@@ -29,6 +29,7 @@ function c48546368.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCode(EVENT_SPSUMMON)
e3:SetCondition(c48546368.discon)
e3:SetCost(c48546368.cost)
e3:SetTarget(c48546368.distg)
e3:SetOperation(c48546368.disop)
c:RegisterEffect(e3)
......@@ -44,7 +45,7 @@ end
function c48546368.cfilter(c)
return c:IsRace(RACE_FAIRY) and c:IsAbleToGraveAsCost()
end
function c48546368.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
function c48546368.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c48546368.cfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,c48546368.cfilter,1,1,REASON_COST)
end
......
--ガードゴー!
function c64283880.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetTarget(c64283880.sptg)
e1:SetOperation(c64283880.spop)
c:RegisterEffect(e1)
end
function c64283880.filter(c,e,tp)
return c:IsReason(REASON_DESTROY) and c:IsReason(REASON_BATTLE+REASON_EFFECT)
and c:IsPreviousLocation(LOCATION_ONFIELD) and c:IsPreviousPosition(POS_FACEUP)
and c:GetPreviousControler()==tp and (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59))
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64283880.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and c64283880.filter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(c64283880.filter,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,c64283880.filter,1,1,nil,e,tp)
Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
end
function c64283880.spfilter(c,e,tp)
return (c:IsSetCard(0x54) or c:IsSetCard(0x82) or c:IsSetCard(0x59)) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c64283880.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)~=0 then
local ct=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ct<=0 then return end
local g=Duel.GetMatchingGroup(c64283880.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(64283880,0)) then
Duel.BreakEffect()
if ct>2 then ct=2 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,ct,nil)
Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP_DEFENCE)
end
end
end
--融合準備
function c66127916.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c66127916.target)
e1:SetOperation(c66127916.activate)
c:RegisterEffect(e1)
end
function c66127916.filter1(c,tp)
return c.material_count and Duel.IsExistingMatchingCard(c66127916.filter2,tp,LOCATION_DECK,0,1,nil,c)
end
function c66127916.filter2(c,fc)
if c:IsHasEffect(EFFECT_FORBIDDEN) or not c:IsAbleToHand() then return false end
for i=1,fc.material_count do
if c:IsCode(fc.material[i]) then return true end
end
return false
end
function c66127916.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c66127916.filter1,tp,LOCATION_EXTRA,0,1,nil,tp) end
end
function c66127916.filter3(c)
return c:IsCode(24094653) and c:IsAbleToHand()
end
function c66127916.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local cg=Duel.SelectMatchingCard(tp,c66127916.filter1,tp,LOCATION_EXTRA,0,1,1,nil,tp)
if cg:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,cg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c66127916.filter2,tp,LOCATION_DECK,0,1,1,nil,cg:GetFirst())
if g:GetCount()>0 then
Duel.SendtoGrave(g,REASON_EFFECT)
local tc=Duel.GetFirstMatchingCard(c66127916.filter3,tp,LOCATION_DECK,0,nil)
if tc and Duel.SelectYesNo(tp,aux.Stringid(66127916,0)) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
end
end
--幻影騎士団シャドーベイル
function c77462146.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(TIMING_DAMAGE_STEP)
e1:SetCondition(c77462146.condition)
e1:SetTarget(c77462146.target)
e1:SetOperation(c77462146.activate)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(77462146,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_ATTACK_ANNOUNCE)
e2:SetRange(LOCATION_GRAVE)
e2:SetCondition(c77462146.spcon)
e2:SetTarget(c77462146.sptg)
e2:SetOperation(c77462146.spop)
c:RegisterEffect(e2)
end
function c77462146.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()~=PHASE_DAMAGE or not Duel.IsDamageCalculated()
end
function c77462146.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
end
function c77462146.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+RESET_END)
e1:SetValue(300)
tc:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENCE)
tc:RegisterEffect(e2)
end
end
function c77462146.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetAttacker():IsControler(1-tp) and Duel.GetAttackTarget()==nil
end
function c77462146.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c77462146.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
if c:IsRelateToEffect(e)
and Duel.IsPlayerCanSpecialSummonMonster(tp,77462146,0,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_TYPE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(TYPE_NORMAL+TYPE_MONSTER)
e1:SetReset(RESET_EVENT+0x47c0000)
c:RegisterEffect(e1,true)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_RACE)
e2:SetValue(RACE_WARRIOR)
c:RegisterEffect(e2,true)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e3:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e3,true)
local e4=e1:Clone()
e4:SetCode(EFFECT_CHANGE_LEVEL)
e4:SetValue(4)
c:RegisterEffect(e4,true)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_ATTACK)
e5:SetValue(0)
c:RegisterEffect(e5,true)
local e6=e1:Clone()
e6:SetCode(EFFECT_SET_BASE_DEFENCE)
e6:SetValue(300)
c:RegisterEffect(e6,true)
Duel.SpecialSummon(c,0,tp,tp,true,false,POS_FACEUP_DEFENCE)
local e7=Effect.CreateEffect(c)
e7:SetType(EFFECT_TYPE_SINGLE)
e7:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e7:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e7:SetReset(RESET_EVENT+0x47e0000)
e7:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e7,true)
end
end
--かっとビング・チャレンジ
function c91677585.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(TIMING_BATTLE_PHASE)
e1:SetCondition(c91677585.condition)
e1:SetTarget(c91677585.target)
e1:SetOperation(c91677585.activate)
c:RegisterEffect(e1)
end
function c91677585.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()==PHASE_BATTLE
end
function c91677585.filter(c)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and c:GetBattledGroupCount()==1 and c:GetEffectCount(EFFECT_EXTRA_ATTACK)==0
end
function c91677585.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c91677585.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c91677585.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c91677585.filter,tp,LOCATION_MZONE,0,1,1,nil)
end
function c91677585.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EXTRA_ATTACK)
e1:SetValue(1)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(EFFECT_CANNOT_ACTIVATE)
e2:SetTargetRange(0,1)
e2:SetValue(c91677585.aclimit)
e2:SetCondition(c91677585.actcon)
e2:SetReset(RESET_PHASE+PHASE_BATTLE)
Duel.RegisterEffect(e2,tp)
end
end
function c91677585.actcon(e)
return Duel.GetAttacker()==e:GetHandler()
end
function c91677585.aclimit(e,re,tp)
return re:IsHasType(EFFECT_TYPE_ACTIVATE) or re:IsActiveType(TYPE_MONSTER)
end
--神の忠告
function c92512625.initial_effect(c)
--Activate(summon)
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DISABLE_SUMMON+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON)
e1:SetCondition(c92512625.condition1)
e1:SetCost(c92512625.cost)
e1:SetTarget(c92512625.target1)
e1:SetOperation(c92512625.activate1)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_FLIP_SUMMON)
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EVENT_SPSUMMON)
c:RegisterEffect(e3)
--Activate(effect)
local e4=Effect.CreateEffect(c)
e4:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY)
e4:SetType(EFFECT_TYPE_ACTIVATE)
e4:SetCode(EVENT_CHAINING)
e4:SetCondition(c92512625.condition2)
e4:SetCost(c92512625.cost)
e4:SetTarget(c92512625.target2)
e4:SetOperation(c92512625.activate2)
c:RegisterEffect(e4)
end
function c92512625.cfilter(c)
return c:IsFacedown() and c:GetSequence()<5
end
function c92512625.condition1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()==0
and not Duel.IsExistingMatchingCard(c92512625.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c92512625.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,3000) end
Duel.PayLPCost(tp,3000)
end
function c92512625.target1(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 c92512625.activate1(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateSummon(eg)
Duel.Destroy(eg,REASON_EFFECT)
end
function c92512625.condition2(e,tp,eg,ep,ev,re,r,rp)
return (re:IsActiveType(TYPE_MONSTER) or re:IsHasType(EFFECT_TYPE_ACTIVATE)) and Duel.IsChainNegatable(ev)
and not Duel.IsExistingMatchingCard(c92512625.cfilter,tp,LOCATION_SZONE,0,1,e:GetHandler())
end
function c92512625.target2(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 c92512625.activate2(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateActivation(ev)
if 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