Commit 14a597a8 authored by TanakaKotoha's avatar TanakaKotoha

fix

parent c2c9f4da
--深界生物 龙鬃螺鸠 --深界生物 龙鬃螺鸠
local m=33330009 function c33330009.initial_effect(c)
local cm=_G["c"..m] --xyz summon
function cm.initial_effect(c)
c:EnableReviveLimit()
--Xyz Summon
aux.AddXyzProcedure(c,nil,6,2) aux.AddXyzProcedure(c,nil,6,2)
--Negate c:EnableReviveLimit()
--negate activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0)) e1:SetDescription(aux.Stringid(33330009,0))
e1:SetCategory(CATEGORY_NEGATE) e1:SetCategory(CATEGORY_NEGATE)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCode(EVENT_CHAINING)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetCondition(cm.ngcon) e1:SetCondition(c33330009.condition)
e1:SetCost(cm.ngcost) e1:SetCost(c33330009.cost)
e1:SetTarget(cm.ngtg) e1:SetTarget(c33330009.target)
e1:SetOperation(cm.ngop) e1:SetOperation(c33330009.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--Destroy Replace --destroy replace
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EFFECT_DESTROY_REPLACE) e2:SetCode(EFFECT_DESTROY_REPLACE)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetTarget(cm.reptg) e2:SetTarget(c33330009.reptg)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--Negate function c33330009.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
function cm.ngcon(e,tp,eg,ep,ev,re,r,rp,chk) if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
and Duel.IsChainDisablable(ev) and re:GetHandler():IsAbleToChangeControler() e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
and not re:GetHandler():IsType(TYPE_TOKEN) return true
else return false end
end end
function cm.ngcost(e,tp,eg,ep,ev,re,r,rp,chk) function c33330009.condition(e,tp,eg,ep,ev,re,r,rp,chk)
return not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and rp~=tp and re:IsActiveType(TYPE_MONSTER) and Duel.IsChainDisablable(ev) and re:GetHandler():IsAbleToChangeControler() and not re:GetHandler():IsType(TYPE_TOKEN)
end
function c33330009.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local og=e:GetHandler():GetOverlayGroup() local og=e:GetHandler():GetOverlayGroup()
if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsSetCard,1,nil,0x556) end if chk==0 then return og:GetCount()>0 and og:IsExists(Card.IsSetCard,1,nil,0x556) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVEXYZ)
local g=og:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x556) local g=og:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x556)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function cm.ngtg(e,tp,eg,ep,ev,re,r,rp,chk) function c33330009.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end if chk==0 then return e:GetHandler():IsType(TYPE_XYZ) end
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) 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 end
function cm.ngop(e,tp,eg,ep,ev,re,r,rp) function c33330009.operation(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
local c=e:GetHandler() local c=e:GetHandler()
if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and not rc:IsType(TYPE_TOKEN) and c:IsType(TYPE_XYZ) and c:IsRelateToEffect(e) and c:IsFaceup() then if Duel.NegateActivation(ev) and rc:IsRelateToEffect(re) and not rc:IsType(TYPE_TOKEN) and c:IsType(TYPE_XYZ) and c:IsRelateToEffect(e) and c:IsFaceup() then
...@@ -55,13 +60,4 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,13 +60,4 @@ function cm.ngop(e,tp,eg,ep,ev,re,r,rp)
end end
Duel.Overlay(c,Group.FromCards(rc)) Duel.Overlay(c,Group.FromCards(rc))
end end
end
--Destroy Replace
function cm.reptg(e,c)
if chk==0 then return not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT)
and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_EFFECT) end
if Duel.SelectEffectYesNo(tp,e:GetHandler(),96) then
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_EFFECT)
return true
else return false end
end end
\ No newline at end of file
...@@ -40,6 +40,7 @@ function c65050065.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -40,6 +40,7 @@ function c65050065.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetTargetCard(eg) Duel.SetTargetCard(eg)
end end
function c65050065.op(e,tp,eg,ep,ev,re,r,rp) function c65050065.op(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_GRAVE,0,1,1,nil,TYPE_XYZ) local g=Duel.SelectMatchingCard(tp,Card.IsType,tp,LOCATION_GRAVE,0,1,1,nil,TYPE_XYZ)
...@@ -58,6 +59,7 @@ function c65050065.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -58,6 +59,7 @@ function c65050065.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA) Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,1-tp,LOCATION_EXTRA)
end end
function c65050065.tgop(e,tp,eg,ep,ev,re,r,rp) function c65050065.tgop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,1,nil) local g1=Duel.SelectMatchingCard(tp,Card.IsAbleToGrave,tp,LOCATION_EXTRA,0,1,1,nil)
local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,1,1,nil) local g2=Duel.SelectMatchingCard(1-tp,Card.IsAbleToGrave,tp,0,LOCATION_EXTRA,1,1,nil)
if g1:GetCount()>0 and g2:GetCount()>0 then if g1:GetCount()>0 and g2:GetCount()>0 then
......
...@@ -3,6 +3,7 @@ function c65050143.initial_effect(c) ...@@ -3,6 +3,7 @@ function c65050143.initial_effect(c)
aux.AddRitualProcGreater2(c,c65050143.ritual_filter) aux.AddRitualProcGreater2(c,c65050143.ritual_filter)
--change effect --change effect
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_ACTION)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_CHAINING) e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_GRAVE) e1:SetRange(LOCATION_GRAVE)
......
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