Commit 52f495d2 authored by Tachibana's avatar Tachibana

eme

parent 744c47b6
Pipeline #8054 passed with stages
in 20 minutes and 32 seconds
......@@ -79,7 +79,7 @@ function cm.eqop(e,tp)
end
end
if not Duel.Equip(tp,tc,c,false) then return end
--equip limit
--equip limit
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -97,6 +97,19 @@ function cm.eqop(e,tp)
local e3=e2:Clone()
e3:SetCode(EFFECT_UPDATE_DEFENSE)
tc:RegisterEffect(e3)
local chain_note=Duel.GetCurrentChain()
if not c:IsSummonType(SUMMON_TYPE_ADVANCE) then return end
for i=1,chain_note do
local loc,seq,acp=Duel.GetChainInfo(i,CHAININFO_TRIGGERING_LOCATION,CHAININFO_TRIGGERING_SEQUENCE,CHAININFO_TRIGGERING_PLAYER)
if loc&LOCATION_SZONE~=0 then
if acp==1-tp and 4-seq==tc:GetSequence() then
Duel.NegateActivation(i)
end
if acp==tp and seq==tc:GetSequence() then
Duel.NegateActivation(i)
end
end
end
end
end
end
......
......@@ -30,9 +30,9 @@ function rkst.advcon(e,c,minc)
end
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(rkst.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
cm.check_s = true
sinnte_check = true
local res = c:IsLevelAbove(7) and minc<=1 and Duel.CheckTribute(c,1,1,mg)
cm.check_s = false
sinnte_check = false
return res or res1
end
function rkst.advop(e,tp,eg,ep,ev,re,r,rp,c)
......@@ -54,12 +54,12 @@ function rkst.advop(e,tp,eg,ep,ev,re,r,rp,c)
e1:Reset()
return
end
cm.check_s = true
sinnte_check = true
local mg=Duel.GetMatchingGroup(rkst.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
cm.check_s = false
sinnte_check = false
end
if not cm then return end
function cm.initial_effect(c)
......
......@@ -67,5 +67,8 @@ function cm.atop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e10,tp)
end
function cm.rtg(e,c)
if sinnte_check then
return c:IsFacedown() and c:IsSummonType(SUMMON_TYPE_ADVANCE)
end
return c:IsFacedown()
end
\ No newline at end of file
......@@ -45,9 +45,9 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
e9:SetType(EFFECT_TYPE_SINGLE)
e9:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e9:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e9:SetCondition(cm.excon)
e9:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e9:SetValue(POS_FACEUP_ATTACK+POS_FACEDOWN_DEFENSE)
e9:SetCondition(cm.condition_for_sum)
local e10=Effect.CreateEffect(c)
e10:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_GRANT)
e10:SetTargetRange(LOCATION_HAND,0)
......@@ -58,8 +58,8 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummonComplete()
end
end
function cm.excon(e)
return not check_for_SINTEI_check_s
function cm.condition_for_sum(e)
return not sinnte_check
end
function cm.advtg(e,c)
return c:IsSetCard(0xcc5)
......
......@@ -87,7 +87,7 @@ function cm.copyop(e,tp,eg,ep,ev,re,r,rp)
tc:RegisterEffect(e1)
local code=tc:GetOriginalCodeRule()
if not tc:IsType(TYPE_TRAPMONSTER) then
cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,1)
cid=c:CopyEffect(code,RESET_EVENT+RESETS_STANDARD)
end
end
end
......
......@@ -144,6 +144,8 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RESOLVECARD)
local g=sg:Select(tp,1,ct+ct2,nil)
for tc in aux.Next(g) do
tc:SetStatus(STATUS_EFFECT_ENABLED,true)
Duel.Equip(tp,tc,c,false,true)
Duel.Hint(HINT_CARD,0,tc:GetOriginalCode())
local op=2
local a=c:IsControlerCanBeChanged()
......@@ -155,27 +157,30 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
else
op=Duel.SelectOption(tp,aux.Stringid(m,5))+1
end
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_ADJUST)
e0:SetRange(LOCATION_MZONE)
e0:SetReset(RESET_EVENT+0x7e0000)
e0:SetCondition(function (e,tp)
if op==0 then
local e0=Effect.CreateEffect(tc)
e0:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e0:SetCode(EVENT_SUMMON_SUCCESS)
e0:SetRange(LOCATION_MZONE)
e0:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e0:SetReset(RESET_EVENT+0x7e0000)
e0:SetCondition(function (e,tp)
return e:GetHandler():IsLocation(LOCATION_MZONE)
end
)
tc:RegisterEffect(e0,true)
if op==0 then
e0:SetOperation( function (e,sp)
tc:RegisterEffect(e0,true)
e0:SetOperation( function (e,sp)
Duel.GetControl(tc,tp)
end
)
local e2=e0:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
tc:RegisterEffect(e2,true)
elseif op==1 then
e0:SetOperation( function (e,sp)
Duel.NegateSummon(tc)
if not Duel.Equip(tp,tc,c,false,true) then return end
--equip limit
local e1=Effect.CreateEffect(c)
local e1=Effect.CreateEffect(tc)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
......@@ -183,8 +188,6 @@ function cm.operation1(e,tp,eg,ep,ev,re,r,rp)
e1:SetLabelObject(c)
e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1,true)
end
)
end
end
Duel.EquipComplete()
......
......@@ -10,6 +10,7 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,m)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCost(cm.setcost1)
e1:SetTarget(cm.settg1)
e1:SetOperation(cm.setop1)
......
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