Commit 598538d5 authored by nanahira's avatar nanahira

add an option for opponent action

parent f389d3a1
...@@ -27,7 +27,7 @@ local function grantDecktop(e) ...@@ -27,7 +27,7 @@ local function grantDecktop(e)
Duel.RegisterEffect(e3,0) Duel.RegisterEffect(e3,0)
end end
local function fieldEffectTemplate(r) local function fieldEffectTemplate(r,notg)
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
...@@ -36,13 +36,15 @@ local function fieldEffectTemplate(r) ...@@ -36,13 +36,15 @@ local function fieldEffectTemplate(r)
e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk) e1:SetTarget(function(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCurrentChain()==0 end if chk==0 then return Duel.GetCurrentChain()==0 end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription()) Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetChainLimit(aux.FALSE) if not notg then
Duel.SetChainLimit(aux.FALSE)
end
end) end)
return e1 return e1
end end
local function deckEffectTemplate() local function deckEffectTemplate(notg)
return fieldEffectTemplate(LOCATION_DECK) return fieldEffectTemplate(LOCATION_DECK,notg)
end end
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
...@@ -164,6 +166,10 @@ function Auxiliary.PreloadUds() ...@@ -164,6 +166,10 @@ function Auxiliary.PreloadUds()
end) end)
grantDecktop(e1) grantDecktop(e1)
local e1=deckEffectTemplate(true)
e1:SetDescription(1294)
grantDecktop(e1)
--single card effects --single card effects
local e1=fieldEffectTemplate(LOCATION_ONFIELD) local e1=fieldEffectTemplate(LOCATION_ONFIELD)
e1:SetDescription(1111) e1:SetDescription(1111)
......
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