Commit a3bef989 authored by Tachibana's avatar Tachibana

eme

parent 69962373
......@@ -50,7 +50,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thfilter(c,tg)
return c:GetCode()==tg
......
......@@ -46,7 +46,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -43,7 +43,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
......
......@@ -46,7 +46,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -40,7 +40,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.spcon1(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD) and Duel.GetCurrentPhase()<PHASE_BATTLE_START
......
......@@ -47,7 +47,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -45,7 +45,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
......
......@@ -47,7 +47,7 @@ function cm.initial_effect(c)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
......
......@@ -48,7 +48,7 @@ function cm.contcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.splimit(e,se,sp,st)
local sc=se:GetHandler()
return sc and sc:IsRace(RACE_DRAGON)
return sc and sc:IsRace(RACE_DRAGON) and se:IsHasType(EFFECT_TYPE_ACTIONS)
end
function cm.actcon(e,tp,eg,ep,ev,re,r,rp)
local te=e:GetLabelObject()
......
......@@ -15,7 +15,7 @@ function cm.initial_effect(c)
e2:SetOperation(cm.condition)
e2:SetOperation(cm.operation)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EFFECT_DESTROY_REPLACE)
e3:SetTarget(cm.reptg)
......@@ -63,7 +63,7 @@ function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
return true
end
function cm.repop(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=math.ceil(c:GetCounter(0x144e)/2)
local ct=math.ceil(e:GetHandler():GetCounter(0x144e)/2)
e:GetHandler():RemoveCounter(tp,0x144e,ct,REASON_EFFECT)
end
function cm.descon(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -106,7 +106,7 @@ function s.op2(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsChainDisablable(0) and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,0,LOCATION_HAND,diff,nil,REASON_EFFECT) and Duel.SelectYesNo(tp,aux.Stringid(id,2)) then
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local g=Duel.SelectMatchingCard(1-tp,Card.IsDiscardable,tp,0,LOCATION_HAND,diff,diff,nil,REASON_EFFECT)
if #g>0 and Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)>0 then
if #g>0 and Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)>0 then
Duel.NegateEffect(0)
return
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