Commit c2e6fc8a authored by nanahira's avatar nanahira

Merge branch 'sznw'

parents 2a00a028 cc4511cd
...@@ -99,6 +99,29 @@ function isPlayerMissedOwner(p) ...@@ -99,6 +99,29 @@ function isPlayerMissedOwner(p)
return not Duel.IsPlayerAffectedByEffect(tp,10000020+p) return not Duel.IsPlayerAffectedByEffect(tp,10000020+p)
end end
function applyBuff(c, buffOption)
local buffEffects=buffEffectsList[buffOption]
local hintGiven=false
for _,buffEffect in ipairs(buffEffects) do
local flags=EFFECT_FLAG_CANNOT_DISABLE
if not hintGiven then
flags=flags+EFFECT_FLAG_CLIENT_HINT
end
local e1=Effect.CreateEffect(c)
e1:SetDescription(AllHints[buffOption])
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(buffEffect.code)
e1:SetProperty(flags)
e1:SetValue(buffEffect.value)
c:RegisterEffect(e1,true)
end
end
function coinRandomNumber()
local c1,c2,c3=Duel.TossCoin(tp,3)
return (c1 | (c2 << 1) | (c3 << 2)) + 1
end
function inititialize() function inititialize()
local choices={} local choices={}
local monsters={} local monsters={}
...@@ -148,21 +171,14 @@ function inititialize() ...@@ -148,21 +171,14 @@ function inititialize()
end end
local buffOption=buffOptions[p] local buffOption=buffOptions[p]
--Debug.Message(buffOption) --Debug.Message(buffOption)
local buffEffects=buffEffectsList[buffOption]
--Debug.Message(type(buffEffects)) --Debug.Message(type(buffEffects))
local hintGiven=false
for _,buffEffect in ipairs(buffEffects) do if c:GetOriginalCode()===4392470 then
local flags=EFFECT_FLAG_CANNOT_DISABLE for option in buffEffectsList do
if not hintGiven then applyBuff(c,option)
flags=flags+EFFECT_FLAG_CLIENT_HINT
end end
local e1=Effect.CreateEffect(c) else
e1:SetDescription(AllHints[buffOption]) applyBuff(c,buffOption)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(buffEffect.code)
e1:SetProperty(flags)
e1:SetValue(buffEffect.value)
c:RegisterEffect(e1,true)
end end
end end
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
......
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