Commit 6da1b485 authored by Vury Leo's avatar Vury Leo

Add 真/青眼の究極竜

parent ffed2c1d
--青眼の究極竜
function c23995346.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,89631139,3,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(89631139),
Fusion.Slot.Code(89631139),
Fusion.Slot.Code(89631139),
}
})
end
--真青眼の究極竜
function c56532353.initial_effect(c)
local s,id,o=GetID()
function s.initial_effect(c)
--fusion material
c:EnableReviveLimit()
aux.AddFusionProcCodeRep(c,89631139,3,true,true)
Fusion.AddFusionProcedure(c,{
slots={
Fusion.Slot.Code(89631139),
Fusion.Slot.Code(89631139),
Fusion.Slot.Code(89631139),
}
})
--chain attack
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_DAMAGE_STEP_END)
e1:SetCountLimit(2,56532353)
e1:SetCondition(c56532353.atcon)
e1:SetCost(c56532353.atcost)
e1:SetOperation(c56532353.atop)
e1:SetCountLimit(2,id)
e1:SetCondition(s.atcon)
e1:SetCost(s.atcost)
e1:SetOperation(s.atop)
c:RegisterEffect(e1)
--Negate
local e2=Effect.CreateEffect(c)
......@@ -19,47 +26,47 @@ function c56532353.initial_effect(c)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_GRAVE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCondition(c56532353.condition)
e2:SetCondition(s.condition)
e2:SetCost(aux.bfgcost)
e2:SetTarget(c56532353.target)
e2:SetOperation(c56532353.operation)
e2:SetTarget(s.target)
e2:SetOperation(s.operation)
c:RegisterEffect(e2)
end
function c56532353.costfilter(c)
function s.costfilter(c)
return c:IsSetCard(0xdd) and c:IsType(TYPE_FUSION) and c:IsAbleToGraveAsCost()
end
function c56532353.atcon(e,tp,eg,ep,ev,re,r,rp)
function s.atcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsSummonType(SUMMON_TYPE_FUSION)
and Duel.GetAttacker()==c and c:IsChainAttackable(0)
and not Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_ONFIELD,0,1,c)
end
function c56532353.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c56532353.costfilter,tp,LOCATION_EXTRA,0,1,nil) end
function s.atcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_EXTRA,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c56532353.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,s.costfilter,tp,LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end
function c56532353.atop(e,tp,eg,ep,ev,re,r,rp)
function s.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.ChainAttack()
end
function c56532353.filter(c,tp)
function s.filter(c,tp)
return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c:IsFaceup() and c:IsSetCard(0xdd)
end
function c56532353.condition(e,tp,eg,ep,ev,re,r,rp)
function s.condition(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:IsExists(c56532353.filter,1,nil,tp)
return g and g:IsExists(s.filter,1,nil,tp)
and Duel.IsChainNegatable(ev)
end
function c56532353.target(e,tp,eg,ep,ev,re,r,rp,chk)
function s.target(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 c56532353.operation(e,tp,eg,ep,ev,re,r,rp)
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then
Duel.Destroy(eg,REASON_EFFECT)
end
......
......@@ -4494,9 +4494,11 @@ function Fusion.MultiOperation(tc,patterns)
local result_cache={}
local use_sig=(fcheck_signature~=nil or (additional_fcheck==nil and additional_fgoalcheck==nil))
for _,pat in ipairs(patterns) do
if pat.fgoalcheck~=nil then
use_sig=false
if use_sig then
for _,pat in ipairs(active_patterns) do
if pat.fgoalcheck~=nil then
use_sig=false
end
end
end
for _,mc in ipairs(eg_arr) do
......
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