Commit bc024b22 authored by Nemo Ma's avatar Nemo Ma

fix

parent 559607ba
......@@ -94,7 +94,7 @@ function cm.reccost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_GRAVE,0,1,nil) end
local sg=Duel.SelectMatchingCard(tp,cm.tdfilter,tp,LOCATION_GRAVE,0,1,60,nil)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
e:SetLabel(sg:GetSum(tamas_getElementCount,TAMA_ELEMENT_LIFE))
e:SetLabel(sg:GetSum(tama.tamas_getElementCount,TAMA_ELEMENT_LIFE))
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......
......@@ -51,11 +51,11 @@ function cm.tgcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.tgfilter(c,ec)
return c:IsAttackBelow(ec:GetAttack()) and c:IsAbleToGrave()
return c:IsAttackBelow(ec:GetAttack())
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToGrave() end
if chkc then return chkc:IsLocation(LOCATION_MZONE) end
if chk==0 then return Duel.IsExistingTarget(cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,c) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,cm.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,c)
......@@ -87,10 +87,10 @@ function cm.tgcost1(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SendtoDeck(sg,nil,2,REASON_COST)
end
function cm.tgtg1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsAbleToGrave() end
if chk==0 then return Duel.IsExistingTarget(Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
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_TOGRAVE)
local g=Duel.SelectTarget(tp,Card.IsAbleToGrave,tp,LOCATION_MZONE,LOCATION_MZONE,1,3,nil)
local g=Duel.SelectTarget(tp,nil,tp,0,LOCATION_MZONE,1,3,nil)
local atk=g:GetSum(Card.GetAttack())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,atk)
......
......@@ -131,7 +131,7 @@ end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:GetOwner()~=c:GetControler() then
Duel.GetControl(c,c:GetControler())
Duel.GetControl(c,c:GetOwner())
end
end
function cm.bgmop(e,tp,eg,ep,ev,re,r,rp)
......
--超魔导龙骑士-青眼龙骑士
function c14090051.initial_effect(c)
local m=14090051
local cm=_G["c"..m]
function cm.initial_effect(c)
--fusion material
aux.AddFusionProcCodeFun(c,46986414,{89631139,cm.mfilter},1,true,true)
c:EnableReviveLimit()
......@@ -23,7 +25,7 @@ function c14090051.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_PRE_BATTLE_DAMAGE)
e3:SetCondition(com.damcon)
e3:SetCondition(cm.damcon)
e3:SetOperation(cm.damop)
c:RegisterEffect(e3)
--negate
......
......@@ -10,14 +10,15 @@ function cm.initial_effect(c)
e2:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e2:SetValue(1)
c:RegisterEffect(e2)
local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(0,1)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(function(e)
return not Duel.IsExistingMatchingCard(nil,tp,LOCATION_ONFIELD,0,1,e:GetHandler())
end)
e1:SetCondition(cm.con)
c:RegisterEffect(e1)
end
function cm.con(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_ONFIELD,0)==1
end
......@@ -16,6 +16,7 @@ function c9910712.initial_effect(c)
c:RegisterEffect(e1)
--position
local e2=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(9910712,1))
e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
......
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