Commit e5dd7afb authored by Tachibana's avatar Tachibana

eme

parent 3608a7c1
Pipeline #8433 failed with stages
in 12 minutes and 54 seconds
......@@ -62,6 +62,12 @@ function cm.initial_effect(c)
e8:SetTargetRange(0xff,0xff)
e8:SetValue(LOCATION_HAND)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e9:SetRange(LOCATION_MZONE)
e9:SetCode(EVENT_TO_HAND)
e9:SetOperation(cm.thop)
c:RegisterEffect(e9)
end
function cm.chklsn(c)
return c:IsHasEffect(12300706) or c:IsLinkSetCard(0x2d7)
......@@ -128,12 +134,12 @@ function cm.macon(e)
return e:GetHandler():GetFlagEffect(m)>0
end
function cm.fildes(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x2d7) and c:IsReason(REASON_DESTROY) and c:IsAbleToHand()
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsSetCard(0x2d7) and c:IsReason(REASON_DESTROY)
end
function cm.thtg(e,c)
if cm.fildes(c) then
if c:IsFacedown() then Duel.ConfirmCards(0,c) end
return true
else return false
end
return cm.fildes(c) and c:IsAbleToHand()
end
function cm.thop(e,tp,eg,ep,ev,re,r,rp)
local mg=eg:Filter(cm.fildes,nil)
if mg then Duel.ConfirmCards(1-tp,mg) end
end
\ No newline at end of file
......@@ -6,14 +6,14 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_OATH)
e1:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_SZONE)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,0)
e2:SetTarget(aux.TargetBoolFunction(cm.chfilter))
e2:SetValue(300)
......@@ -23,17 +23,16 @@ function cm.initial_effect(c)
c:RegisterEffect(e3)
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e4:SetRange(LOCATION_SZONE)
e4:SetRange(LOCATION_FZONE)
e4:SetCode(EVENT_DESTROY)
e4:SetTarget(cm.ovtg)
e4:SetCondition(cm.ovcon)
e4:SetOperation(cm.ovop)
e4:SetCountLimit(2)
c:RegisterEffect(e4)
local e5=Effect.CreateEffect(c)
e5:SetType(EFFECT_TYPE_FIELD)
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e5:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e5:SetRange(LOCATION_SZONE)
e5:SetRange(LOCATION_FZONE)
e5:SetTargetRange(LOCATION_ONFIELD,0)
e5:SetTarget(cm.target1)
e5:SetValue(1)
......@@ -64,14 +63,14 @@ function cm.target1(e,c)
return c:IsSetCard(0x8a72) or c:IsSetCard(0x7a72)
end
function cm.mfilter(c,e,tp)
return Duel.GetFlagEffect(tp,m)<2 and Duel.IsExistingMatchingCard(function(c,mc)
return Duel.IsExistingMatchingCard(function(c,mc)
return c:IsType(TYPE_MONSTER) and not c:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsSetCard(0x8a72) and mc:IsCanBeXyzMaterial(c) and
((mc:IsReason(REASON_BATTLE) and mc:GetReasonPlayer()==tp and mc:GetReasonCard():IsSetCard(0x8a72,0x7a72))
or (mc:IsReason(REASON_EFFECT) and mc:GetReasonEffect():GetHandlerPlayer()==tp and mc:GetReasonEffect():GetHandler():IsSetCard(0x8a72,0x7a72)))
end,tp,LOCATION_MZONE,0,1,nil,c)
end
function cm.ovtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return eg:IsExists(cm.mfilter,1,nil,e,tp) end
function cm.ovcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(cm.mfilter,1,nil,e,tp) and Duel.GetFlagEffect(tp,m)<2
end
function cm.ovop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
......
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