Commit 22f098a2 authored by Tachibana's avatar Tachibana

nmbd

parent 36f0d04e
--星希花音
local m=28323000
local cm=_G["c"..m]
xpcall(function() require("expansions/script/c20100000") end,function() require("script/c20100000") end)
if not Kanon then
Kanon=Kanon or {}
------
function Kanon.Attack(c)
local ea=Effect.CreateEffect(c)
ea:SetDescription(aux.Stringid(28323001,1))
ea:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
ea:SetCode(EVENT_BATTLE_START)
ea:SetTarget(Kanon.ChainAttackTg)
ea:SetRange(LOCATION_MZONE)
ea:SetCategory(CATEGORY_ATKCHANGE)
ea:SetOperation(Kanon.ChainAttackOp)
ea:SetCountLimit(1)
c:RegisterEffect(ea)
end
function Kanon.ChainAttackTg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsControler(tp) and ac:IsRace(RACE_WARRIOR) and ac~=c
and c:GetAttackAnnouncedCount()==0 and c:IsAttackable() end
Duel.SetTargetCard(c)
end
function Kanon.ChainAttackOp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local atk=c:GetAttack()
if atk<1 then return end
if ac:IsFaceup() and ac:IsRelateToBattle() and c:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(Kanon.ChainAttackCon)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
ac:RegisterEffect(e2)
end
end
function Kanon.ChainAttackCon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle()
end
------
end
if cm then
------
function cm.initial_effect(c)
--xyz summon
aux.AddXyzProcedure(c,aux.FilterBoolFunction(Card.IsRace,RACE_WARRIOR),3,2)
c:EnableReviveLimit()
Kanon.Attack(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -19,17 +75,6 @@ function cm.initial_effect(c)
e1:SetCost(cm.atkcost)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--Chain Attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.asktg)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
end
function cm.atkcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
......@@ -46,38 +91,5 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1)
end
end
function cm.asktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsControler(tp) and ac:IsRace(RACE_WARRIOR) and ac~=c
and c:GetAttackAnnouncedCount()==0 and c:IsAttackable() end
Duel.SetTargetCard(c)
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local atk=c:GetAttack()
if atk<1 then return end
if ac:IsFaceup() and ac:IsRelateToBattle() and c:IsRelateToEffect(e) then
local e1=nef(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=nef(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.askcon)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
ac:RegisterEffect(e2)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle()
------
end
......@@ -5,6 +5,7 @@ xpcall(function() require("expansions/script/c20100000") end,function() require(
function cm.initial_effect(c)
c:EnableReviveLimit()
aux.AddXyzProcedure(c,nil,6,2,cm.ovfilter,aux.Stringid(m,3),99,cm.xyzop)
Kanon.Attack(c)
--attack up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
......@@ -19,17 +20,6 @@ function cm.initial_effect(c)
e1:SetTarget(cm.atktg)
e1:SetOperation(cm.atkop)
c:RegisterEffect(e1)
--Chain Attack
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(m,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_BATTLE_START)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetTarget(cm.asktg)
e2:SetOperation(cm.askop)
c:RegisterEffect(e2)
--spsummon bgm
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......@@ -69,41 +59,6 @@ function cm.atkop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
end
end
function cm.asktg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
if chk==0 then return ac:IsControler(tp) and ac:IsRace(RACE_WARRIOR) and ac~=c
and c:GetAttackAnnouncedCount()==0 and c:IsAttackable() end
Duel.SetTargetCard(c)
end
function cm.askop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ac=Duel.GetAttacker()
local atk=c:GetAttack()
if atk<1 then return end
if ac:IsFaceup() and ac:IsRelateToBattle() and c:IsRelateToEffect(e) then
local e1=nef(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1)
local e2=nef(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(cm.askcon)
e2:SetValue(atk)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_DAMAGE)
ac:RegisterEffect(e2)
end
end
function cm.askcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local ph=Duel.GetCurrentPhase()
return (ph==PHASE_DAMAGE or ph==PHASE_DAMAGE_CAL) and c:IsRelateToBattle()
end
function cm.sumcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_XYZ)
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