Commit 5c1448cd authored by JoyJ's avatar JoyJ

update srv5555 scripts

parent da071445
--村规决斗:进攻部署 --村规决斗:进攻部署
--所有怪兽得到以下效果: --所有怪兽得到以下效果:
--这张卡进行攻击的伤害计算时才能发动。这个效果的发动和效果不会被无效化。 --这张卡进行攻击的伤害计算时才能发动。这个效果的发动和效果不会被无效化。
--从卡组选1只与这张卡种族相同的怪兽里侧攻击表示特殊召唤。 --从卡组选1只与这张卡种族或属性相同的怪兽里侧攻击表示特殊召唤。
--细则: --细则:
--自己卡组没有条件合适的怪兽的场合,即使对方能选,也不能发动。 --自己卡组没有条件合适的怪兽的场合,即使对方能选,也不能发动。
...@@ -50,7 +50,7 @@ end ...@@ -50,7 +50,7 @@ end
function CUNGUI.filter(c,e,tp) function CUNGUI.filter(c,e,tp)
local tc = e:GetHandler() local tc = e:GetHandler()
return c:IsRace(tc:GetRace()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsRace(tc:GetRace()) or c:IsAttribute(tc:GetAttribute())) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk) function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
--村规决斗:贤者之石 --村规决斗:贤者之石
--所有魔法·陷阱卡发动时的效果处理为: --所有魔法·陷阱卡发动时的效果处理可以变为:
--宣言1个卡名。那个卡名的怪兽从卡组外加入卡组·额外卡组。 --宣言1个卡名。那个卡名的怪兽从卡组外加入卡组·额外卡组。
--加入了主卡组,且这个回合第一次以此类效果将怪兽加入主卡组的场合,再从卡组选1只怪兽加入手卡。 --加入了主卡组,且这个回合第一次以此类效果将怪兽加入主卡组的场合,再从卡组选1只怪兽加入手卡(对方不能确认这个效果加入手卡的卡)
--所有陷阱卡都可以在自己的回合从手卡发动。 --所有陷阱卡都可以在自己的回合从手卡发动。
--后攻多抽2张。 --后攻多抽2张。
CUNGUI = {} CUNGUI = {}
...@@ -13,8 +13,8 @@ CUNGUI.turn[1] = 0 ...@@ -13,8 +13,8 @@ CUNGUI.turn[1] = 0
Register = Card.RegisterEffect Register = Card.RegisterEffect
Card.RegisterEffect = function(c,e,forced) Card.RegisterEffect = function(c,e,forced)
if (e:GetType() & EFFECT_TYPE_ACTIVATE) > 0 and not CUNGUI.registered[c] then if (e:GetType() & EFFECT_TYPE_ACTIVATE) > 0 and not CUNGUI.registered[c] then
if not e:GetDescription() then if not e:GetDescription() or e:GetDescription()==0 then
e:SetDescription(aux.Stringid(5772618,0)) e:SetDescription(7)
end end
CUNGUI.registered[c] = true CUNGUI.registered[c] = true
local e1 = Effect.CreateEffect(c) local e1 = Effect.CreateEffect(c)
...@@ -22,7 +22,7 @@ Card.RegisterEffect = function(c,e,forced) ...@@ -22,7 +22,7 @@ Card.RegisterEffect = function(c,e,forced)
e1:SetCategory(CATEGORY_TOEXTRA) e1:SetCategory(CATEGORY_TOEXTRA)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(10000) e1:SetCountLimit(10000)
e1:SetDescription(aux.Stringid(269012,1)) e1:SetDescription(aux.Stringid(66666004,4))
e1:SetCondition(aux.TRUE) e1:SetCondition(aux.TRUE)
e1:SetCost(aux.TRUE) e1:SetCost(aux.TRUE)
e1:SetTarget(aux.TRUE) e1:SetTarget(aux.TRUE)
......
--村规决斗:顺风飙车 --村规决斗:顺风飙车
--每次因通常抽卡以外抽卡的场合,那个对方从卡组抽2张。 --①:每次一名玩家因通常抽卡,和①效果以外抽卡的场合,那个对方从卡组抽2张。
--每次卡因抽卡以外的方式加入手卡的场合,那个原本所有者的对方(如果有多张,则取第一张的原本所有者)从卡组抽2张。 --②:每次卡因抽卡以外的方式加入手卡的场合,那个原本所有者的对方(如果有多张,则取第一张的原本所有者)从卡组抽2张。
CUNGUI = {} CUNGUI = {}
......
--村规决斗:断绝不死 --村规决斗:断绝不死
--送去墓地的卡直接消失。 --开局时,双方将1张不死世界(4064256)从卡组外表侧表示除外。
--被除外的卡直接消失。 --这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
-->ygopro客户端引擎不支持,废弃 --这张卡得到以下效果。
--墓地的卡里侧表示除外。
--这张卡以外的表侧表示的除外的卡返回卡组。
CUNGUI = {} CUNGUI = {}
CUNGUI.RuleCardCode=4064256
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
-- one more draw --adjust
local e1=Effect.GlobalEffect() local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
function CUNGUI.AdjustOperation()
if not CUNGUI.RuleCardInit then
CUNGUI.RuleCardInit = true
CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1)
end
if not CUNGUI.DrawInit then
CUNGUI.DrawInit = true
Duel.Draw(1,1,REASON_RULE)
end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[1] and (not CUNGUI.RuleCard[1]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[1]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[1],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[0] and not CUNGUI.RuleCard[0]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[0],POS_FACEUP)
end
if CUNGUI.RuleCard[1] and not CUNGUI.RuleCard[1]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[1],POS_FACEUP)
end
end
CUNGUI.RuleCard={}
function CUNGUI.RegisterCardRule(tp)
local c=Duel.CreateToken(tp,CUNGUI.RuleCardCode)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
-- one more draw
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_REMOVED)
e1:SetOperation(function(e) e1:SetOperation(function(e)
local g = Duel.GetMatchingGroup(nil,0,LOCATION_GRAVE+LOCATION_REMOVED,LOCATION_GRAVE+LOCATION_REMOVED,nil) local g = Duel.GetMatchingGroup(nil,tp,LOCATION_GRAVE,0,nil)
Duel.Exile(g,REASON_RULE) Duel.Remove(g,POS_FACEDOWN,REASON_RULE)
g = Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_REMOVED,0,c)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
end) end)
Duel.RegisterEffect(e1,0) c:RegisterEffect(e1)
end end
\ No newline at end of file
--村规决斗:人海战术 --村规决斗:人海战术
--所有(非衍生物)怪兽得到以下效果: --所有(非衍生物)怪兽得到以下效果:
--这张卡召唤·特殊召唤成功时发动。 --①:这张卡召唤·特殊召唤成功时发动。
--宣言1个数字(1-12),从卡组外在自己场上将1只「白骨」特殊召唤。 --宣言1个数字(1-12),从卡组外在自己场上将1只「白骨」(攻0/守0)特殊召唤。
--这个效果特殊召唤的衍生物的等级和宣言的数字相同,属性、种族和卡名变成和特殊召唤的怪兽相同(离场后仍然生效) --这个效果特殊召唤的衍生物的等级和宣言的数字相同,属性、种族和卡名变成和特殊召唤的怪兽相同(发生位置改变后后仍然生效)。
--这个效果特殊召唤的衍生物在特殊召唤的回合不能使用这个①效果(发生位置改变后依然不能使用)。
CUNGUI = {} CUNGUI = {}
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
...@@ -19,7 +20,7 @@ end ...@@ -19,7 +20,7 @@ end
CUNGUI.RegisteredMonsters = Group.CreateGroup() CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(Card.IsType,0,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,nil,TYPE_MONSTER) local g = Duel.GetMatchingGroup(Card.IsType,0,0xff,0xff,nil,TYPE_MONSTER)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects) g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
end end
...@@ -58,7 +59,7 @@ function CUNGUI.tkop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +59,7 @@ function CUNGUI.tkop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_SET_ATTACK_FINAL) e2:SetCode(EFFECT_SET_ATTACK_FINAL)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE+EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(1) e2:SetValue(0)
token:RegisterEffect(e2) token:RegisterEffect(e2)
local e3=Effect.CreateEffect(token) local e3=Effect.CreateEffect(token)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
CUNGUI.RegisteredMonsters = Group.CreateGroup() CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(nil,0,LOCATION_DECK+LOCATION_HAND,LOCATION_DECK+LOCATION_HAND,nil) local g = Duel.GetMatchingGroup(nil,0,0xff,0xff,nil)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects) g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
end end
...@@ -31,6 +31,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -31,6 +31,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetDescription(66666004,5)
e1:SetCondition(CUNGUI.spcon) e1:SetCondition(CUNGUI.spcon)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
......
--村规决斗:不关你事 --村规决斗:不关你事
--所有(入连锁的)效果得到以下追加文本: --所有(入连锁的)效果得到以下追加文本:
--自己在这场决斗中是后攻,且这个效果的发动是自己整场决斗中第一次把效果发动的场合, --这个效果的发动是自己这个回合第一次把效果发动的场合,
--这个效果的发动和效果不能被无效化,对方不能针对这个效果的发动把魔法·陷阱·怪兽的效果发动。 --这个效果的发动和效果不能被无效化,对方不能针对这个效果的发动把魔法·陷阱·怪兽的效果发动。
CUNGUI = {} CUNGUI = {}
CUNGUI.used={}
CUNGUI.Registered = Group.CreateGroup() CUNGUI.Registered = Group.CreateGroup()
CUNGUI.PropertySaver = {} CUNGUI.PropertySaver = {}
local OrigClone = Effect.Clone
local OrigRegisterEffect = Card.RegisterEffect local OrigRegisterEffect = Card.RegisterEffect
Card.RegisterEffect = function(c,e) Card.RegisterEffect = function(c,e)
...@@ -29,8 +29,8 @@ function CUNGUI.GetNewTarget(target) ...@@ -29,8 +29,8 @@ function CUNGUI.GetNewTarget(target)
e:SetProperty(CUNGUI.PropertySaver[e]) e:SetProperty(CUNGUI.PropertySaver[e])
CUNGUI.PropertySaver[e]=false CUNGUI.PropertySaver[e]=false
end end
if tp~=0 and not CUNGUI.used and e:IsHasType(0x7d0) then if not CUNGUI.used[tp] and e:IsHasType(0x7d0) then
CUNGUI.used=true CUNGUI.used[tp]=true
if not CUNGUI.PropertySaver[e] then CUNGUI.PropertySaver[e]=e:GetProperty() end if not CUNGUI.PropertySaver[e] then CUNGUI.PropertySaver[e]=e:GetProperty() end
local prop=CUNGUI.PropertySaver[e] local prop=CUNGUI.PropertySaver[e]
prop = prop | 0x2000600 prop = prop | 0x2000600
...@@ -43,4 +43,19 @@ function CUNGUI.GetNewTarget(target) ...@@ -43,4 +43,19 @@ function CUNGUI.GetNewTarget(target)
end end
function CUNGUI.climit(e,ep,tp) function CUNGUI.climit(e,ep,tp)
return tp==ep return tp==ep
end
function Auxiliary.PreloadUds()
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetCountLimit(1)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
function CUNGUI.AdjustOperation()
CUNGUI.used[0]=false
CUNGUI.used[1]=false
end end
\ No newline at end of file
...@@ -171,7 +171,8 @@ function CUNGUI.DecreaseCostWhenUsingSpellOrTrap(e,tp,eg,ep,ev,re,r,rp) ...@@ -171,7 +171,8 @@ function CUNGUI.DecreaseCostWhenUsingSpellOrTrap(e,tp,eg,ep,ev,re,r,rp)
if re:IsActiveType(TYPE_MONSTER) then return end if re:IsActiveType(TYPE_MONSTER) then return end
local p = re:GetOwner():GetControler() local p = re:GetOwner():GetControler()
CUNGUI.SVCosts[p] = CUNGUI.SVCosts[p] - 1 CUNGUI.SVCosts[p] = CUNGUI.SVCosts[p] - 1
Debug.Message("已支付1费以发动魔法·陷阱效果。当前费用:"..CUNGUI.SVCosts[p]) Duel.Hint(p,HINT_NUMBER,CUNGUI.SVCosts[p])
Duel.Hint(1-p,HINT_NUMBER,CUNGUI.SVCosts[p])
end end
function CUNGUI.RecoverSVCost(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.RecoverSVCost(e,tp,eg,ep,ev,re,r,rp)
...@@ -179,11 +180,8 @@ function CUNGUI.RecoverSVCost(e,tp,eg,ep,ev,re,r,rp) ...@@ -179,11 +180,8 @@ function CUNGUI.RecoverSVCost(e,tp,eg,ep,ev,re,r,rp)
local svcost=math.ceil(tc/2) local svcost=math.ceil(tc/2)
if svcost > 10 then svcost = 10 end if svcost > 10 then svcost = 10 end
CUNGUI.SVCosts[Duel.GetTurnPlayer()]=svcost CUNGUI.SVCosts[Duel.GetTurnPlayer()]=svcost
Duel.Hint(HINT_NUMBER,PLAYER_ALL,svcost) Duel.Hint(tp,HINT_NUMBER,svcost)
Debug.Message("已回复费用,当前费用:"..svcost) Duel.Hint(1-tp,HINT_NUMBER,svcost)
if tc==4 or tc==5 then
Debug.Message("回合玩家已可进化。当前进化点:"..(tc-2))
end
end end
function CUNGUI.ChangeDamage(e,re,val,r,rp,rc) function CUNGUI.ChangeDamage(e,re,val,r,rp,rc)
...@@ -276,13 +274,15 @@ function CUNGUI.MonsterUseCost(e,tp,eg,ep,ev,re,r,rp) ...@@ -276,13 +274,15 @@ function CUNGUI.MonsterUseCost(e,tp,eg,ep,ev,re,r,rp)
local needCost = math.floor((atk+def)/1000) local needCost = math.floor((atk+def)/1000)
if CUNGUI.SVCosts[rp]>=needCost then if CUNGUI.SVCosts[rp]>=needCost then
CUNGUI.SVCosts[rp] = CUNGUI.SVCosts[rp] - needCost CUNGUI.SVCosts[rp] = CUNGUI.SVCosts[rp] - needCost
Debug.Message("已支付"..needCost.."费以召唤怪兽。当前费用:"..CUNGUI.SVCosts[rp]) Duel.Hint(rp,HINT_NUMBER,CUNGUI.SVCosts[rp])
Duel.Hint(1-rp,HINT_NUMBER,CUNGUI.SVCosts[rp])
else else
needCost = needCost - CUNGUI.SVCosts[rp] needCost = needCost - CUNGUI.SVCosts[rp]
if needCost > Duel.GetLP(rp) then needCost = Duel.GetLP(rp) end if needCost > Duel.GetLP(rp) then needCost = Duel.GetLP(rp) end
CUNGUI.SVCosts[rp] = 0 CUNGUI.SVCosts[rp] = 0
OrigPayLPCost(rp,needCost) OrigPayLPCost(rp,needCost)
Debug.Message("已支付全部剩余费用与"..needCost.."点基本分以召唤怪兽。") Duel.Hint(rp,HINT_NUMBER,0)
Duel.Hint(1-rp,HINT_NUMBER,0)
end end
end end
...@@ -296,13 +296,15 @@ function CUNGUI.MonsterUseCostMSet(e,tp,eg,ep,ev,re,r,rp) ...@@ -296,13 +296,15 @@ function CUNGUI.MonsterUseCostMSet(e,tp,eg,ep,ev,re,r,rp)
local needCost = math.floor((atk+def)/1000) local needCost = math.floor((atk+def)/1000)
if CUNGUI.SVCosts[rp]>=needCost then if CUNGUI.SVCosts[rp]>=needCost then
CUNGUI.SVCosts[rp] = CUNGUI.SVCosts[rp] - needCost CUNGUI.SVCosts[rp] = CUNGUI.SVCosts[rp] - needCost
Debug.Message("已支付"..needCost.."费以覆盖怪兽。当前费用:"..CUNGUI.SVCosts[rp]) Duel.Hint(rp,HINT_NUMBER,CUNGUI.SVCosts[rp])
Duel.Hint(1-rp,HINT_NUMBER,CUNGUI.SVCosts[rp])
else else
needCost = needCost - CUNGUI.SVCosts[rp] needCost = needCost - CUNGUI.SVCosts[rp]
if needCost > Duel.GetLP(rp) then needCost = Duel.GetLP(rp) end if needCost > Duel.GetLP(rp) then needCost = Duel.GetLP(rp) end
CUNGUI.SVCosts[rp] = 0 CUNGUI.SVCosts[rp] = 0
OrigPayLPCost(rp,needCost) OrigPayLPCost(rp,needCost)
Debug.Message("已支付全部剩余费用与"..needCost.."点基本分以召唤怪兽。") Duel.Hint(rp,HINT_NUMBER,0)
Duel.Hint(1-rp,HINT_NUMBER,0)
end end
end end
...@@ -334,7 +336,8 @@ function CUNGUI.Evolution(e,tp,eg,ep,ev,re,r,rp) ...@@ -334,7 +336,8 @@ function CUNGUI.Evolution(e,tp,eg,ep,ev,re,r,rp)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
Debug.Message("已进行进化。当前进化点:"..CUNGUI.SVEvolutionPoints[tp]) Duel.Hint(tp,HINT_NUMBER,CUNGUI.SVEvolutionPoints[tp])
Duel.Hint(1-tp,HINT_NUMBER,CUNGUI.SVEvolutionPoints[tp])
end end
CUNGUI.AttackLimitEffects={} CUNGUI.AttackLimitEffects={}
......
--村规决斗:影流之主 --村规决斗:影流之主
--所有怪兽得到以下效果: --所有怪兽得到以下效果:
--(仅通常怪兽)这张卡也当作效果怪兽使用。
--这张卡只要在场上存在,就尽可能地占据3个格子。 --这张卡只要在场上存在,就尽可能地占据3个格子。
--这张卡在1个战斗阶段可以攻击3次。 --这张卡在1个战斗阶段可以攻击3次。
CUNGUI = {} CUNGUI = {}
...@@ -26,16 +25,6 @@ end ...@@ -26,16 +25,6 @@ end
function CUNGUI.RegisterMonsterSpecialEffects(c) function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c) CUNGUI.RegisteredMonsters:AddCard(c)
if c:IsType(TYPE_NORMAL) then
--Normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(TYPE_EFFECT)
c:RegisterEffect(e1)
end
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
......
--村规决斗:反向支付
--支付Cost时,按相反动作来支付。
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
--adjust --adjust
......
--村规决斗:某次周赛
--所有起动效果变为2速。 --所有起动效果变为2速。
--游戏开始时,后攻者抽2张卡 --游戏开始时,后攻者抽1张
--每个回合开始时,非回合玩家将【灰流丽】【效果遮蒙者】【原始生命态尼比鲁】【增殖的G】【幽鬼兔】中的随机1张加入手卡。回合结束时,那张卡里侧表示除外。 --每个回合开始时,非回合玩家将【灰流丽】【效果遮蒙者】【原始生命态尼比鲁】【增殖的G】【幽鬼兔】中的随机1张加入手卡。回合结束时,那张卡里侧表示除外。
CUNGUI = {} CUNGUI = {}
......
--村规决斗:昨日方舟 --村规决斗:昨日方舟
--所有怪兽得到以下效果: --所有怪兽得到以下效果:
--(仅通常怪兽)这张卡也当作效果怪兽使用。
--这个类型的效果1回合能使用最多3次。 --这个类型的效果1回合能使用最多3次。
--自己主要阶段才能发动。宣言1个种族,从自己卡组上面把5张卡翻开。 --自己主要阶段才能发动。宣言1个种族,从自己卡组上面把5张卡翻开。
--可以从那之中选1只那个种族的怪兽特殊召唤。 --可以从那之中选1只那个种族的怪兽特殊召唤。
...@@ -29,16 +28,6 @@ end ...@@ -29,16 +28,6 @@ end
function CUNGUI.RegisterMonsterSpecialEffects(c) function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c) CUNGUI.RegisteredMonsters:AddCard(c)
if c:IsType(TYPE_NORMAL) then
--Normal monster
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_ADD_TYPE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(TYPE_EFFECT)
c:RegisterEffect(e1)
end
--spsummon2 --spsummon2
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(41546,1)) e2:SetDescription(aux.Stringid(41546,1))
......
--村规决斗:死者苏生
--所有卡没有苏生限制。
--移除所有场上只能存在1张的限制。
--从第2回合开始,每回合开始时,把1张【死者苏生】加入回合玩家手卡。
--那张卡回合结束时里侧表示除外(移动过位置也除外)。
CUNGUI = {} CUNGUI = {}
Card.EnableReviveLimit = function(card) end Card.EnableReviveLimit = function(card) end
Card.SetUniqueOnField = function(c,s,o,code,loc) end Card.SetUniqueOnField = function(c,s,o,code,loc) end
...@@ -15,7 +21,7 @@ end ...@@ -15,7 +21,7 @@ end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetTurnCount() > 1 then if Duel.GetTurnCount() > 1 then
local tp = Duel.GetTurnPlayer() tp = Duel.GetTurnPlayer()
local card = Duel.CreateToken(tp,83764718) local card = Duel.CreateToken(tp,83764718)
if Duel.SendtoHand(card,nil,REASON_RULE)<1 then return end if Duel.SendtoHand(card,nil,REASON_RULE)<1 then return end
local e1=Effect.CreateEffect(card) local e1=Effect.CreateEffect(card)
......
...@@ -27,7 +27,7 @@ function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -27,7 +27,7 @@ function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
CUNGUI.INIT = true CUNGUI.INIT = true
Duel.SetLP(1,Duel.GetLP(1) + 4000) Duel.SetLP(1,Duel.GetLP(1) + 4000)
end end
local g = Duel.GetMatchingGroup(Card.IsType,0,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_MZONE,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_MZONE,nil,TYPE_MONSTER) local g = Duel.GetMatchingGroup(Card.IsType,0,0xff,0xff,nil,TYPE_MONSTER)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects) g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
end end
......
...@@ -20,8 +20,8 @@ CUNGUI.RegisteredMonsters = Group.CreateGroup() ...@@ -20,8 +20,8 @@ CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(Card.IsType,0,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,nil,TYPE_MONSTER) local g = Duel.GetMatchingGroup(Card.IsType,0,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,nil,TYPE_MONSTER)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects) g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
if not CUNGUI.drawed then if not CUNGUI.InitDraw then
CUNGUI.drawed = true CUNGUI.InitDraw = true
Duel.Draw(0,1,REASON_RULE) Duel.Draw(0,1,REASON_RULE)
end end
end end
...@@ -34,6 +34,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -34,6 +34,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetDescription(aux.Stringid(66666004,5))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP,1) e1:SetTargetRange(POS_FACEUP,1)
...@@ -48,6 +49,7 @@ function CUNGUI.spcon(e,c) ...@@ -48,6 +49,7 @@ function CUNGUI.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
return Duel.IsExistingMatchingCard(CUNGUI.spfilter,tp,0,LOCATION_MZONE,1,nil,tp) return Duel.IsExistingMatchingCard(CUNGUI.spfilter,tp,0,LOCATION_MZONE,1,nil,tp)
and Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1)
end end
function CUNGUI.spop(e,tp,eg,ep,ev,re,r,rp,c) function CUNGUI.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
......
...@@ -32,10 +32,10 @@ end ...@@ -32,10 +32,10 @@ end
function CUNGUI.RegisterMonsterSpecialEffects(c) function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c) CUNGUI.RegisteredMonsters:AddCard(c)
--ss --ss
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(2648201,1)) e4:SetDescription(aux.Stringid(66666004,5))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON) e4:SetCategory(CATEGORY_SPECIAL_SUMMON)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCountLimit(1,98765432) e4:SetCountLimit(1,98765432)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
--①1回合1次,这张卡被除外的状态下才能发动。这个效果不会被无效化。 --①1回合1次,这张卡被除外的状态下才能发动。这个效果不会被无效化。
--宣言1个【禁止令】以外的卡名,在这场决斗中,对方的那些卡受到禁止令效果影响。 --宣言1个【禁止令】以外的卡名,在这场决斗中,对方的那些卡受到禁止令效果影响。
--②1回合1次,这张卡被除外的状态下才能发动。这个效果不会被无效化。 --②1回合1次,这张卡被除外的状态下才能发动。这个效果不会被无效化。
--这张卡撕碎(效果名:卡片破坏),解除自己目前受到的所有因此类卡的①效果的禁止令效果。 --这张卡撕碎(效果名:卡片破坏),解除自己目前受到的所有因此类①效果的禁止令效果。
--③这张卡不是表侧表示除外状态的场合,这张卡表侧表示除外。这个效果不会被无效化,在卡组·手卡也会适用。 --③这张卡不是表侧表示除外状态的场合,这张卡表侧表示除外。这个效果不会被无效化,在卡组·手卡也会适用。
CUNGUI = {} CUNGUI = {}
...@@ -68,7 +68,7 @@ function CUNGUI.RegisterForbiddenRule(tp) ...@@ -68,7 +68,7 @@ function CUNGUI.RegisterForbiddenRule(tp)
end end
function CUNGUI.operation2(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.operation2(e,tp,eg,ep,ev,re,r,rp)
for i,v in pairs(CUNGUI.ForbiddenEffects[1-tp]) do for _,v in pairs(CUNGUI.ForbiddenEffects[1-tp]) do
v:Reset() v:Reset()
end end
Duel.Exile(e:GetHandler(),REASON_RULE) Duel.Exile(e:GetHandler(),REASON_RULE)
...@@ -84,7 +84,6 @@ function CUNGUI.forbidop(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,7 +84,6 @@ function CUNGUI.forbidop(e,tp,eg,ep,ev,re,r,rp)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE) e2:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e2:SetCode(EFFECT_FORBIDDEN) e2:SetCode(EFFECT_FORBIDDEN)
e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(0x7f,0) e2:SetTargetRange(0x7f,0)
e2:SetTarget(CUNGUI.bantg) e2:SetTarget(CUNGUI.bantg)
e2:SetLabel(code) e2:SetLabel(code)
...@@ -96,18 +95,3 @@ function CUNGUI.bantg(e,c) ...@@ -96,18 +95,3 @@ function CUNGUI.bantg(e,c)
local fcode=e:GetLabel() local fcode=e:GetLabel()
return code1==fcode or code2==fcode return code1==fcode or code2==fcode
end end
...@@ -4,17 +4,18 @@ ...@@ -4,17 +4,18 @@
--把这张卡从手卡里侧表示除外才能发动。从卡组外将1张随机禁卡加入手卡或额外卡组。 --把这张卡从手卡里侧表示除外才能发动。从卡组外将1张随机禁卡加入手卡或额外卡组。
--这个效果加入手卡的卡,在那个回合不能把此类效果发动(即使发生过位置移动)。 --这个效果加入手卡的卡,在那个回合不能把此类效果发动(即使发生过位置移动)。
--细则: --细则:
--采用2022年1月禁卡表。 --采用2022年4月禁卡表。
--加入的卡不需要给对方确认。 --加入的卡不需要给对方确认。
CUNGUI = {} CUNGUI = {}
CUNGUI.forbidden={91869203,20663556,44910027,51858306,25862681,53804307,7563579,17330916,34945480, CUNGUI.forbidden={91869203,20663556,44910027,51858306,25862681,53804307,7563579,17330916,
90411554,8903700,11384280,17412721,67441435,34124316,88071625,61665245,52653092,48905153,85115440, 34945480,90411554,8903700,11384280,17412721,67441435,34124316,88071625,61665245,52653092,
59537380,86148577,88581108,21377582,94677445,16923472,15341821,37818794,18326736,79875176,75732622, 48905153,85115440,59537380,86148577,88581108,21377582,94677445,16923472,15341821,37818794,
22593417,39064822,3679218,54719828,58820923,26400609,71525232,78706415,93369354,23558733,9929398, 18326736,79875176,75732622,22593417,39064822,03679218,54719828,58820923,26400609,71525232,
9047460,31178212,63101919,34206604,4423206,14702066,96782886,3078576,34086406,85243784,57421866, 78706415,93369354,23558733,9929398,9047460,70369116,31178212,63101919,34206604,4423206,
41482598,44763025,17375316,19613556,74191942,42829885,45986603,55144522,4031928,23557835,31423101, 14702066,96782886,3078576,34086406,85243784,57421866,41482598,44763025,17375316,19613556,
57953380,54447022,60682203,69243953,79571449,70828912,42703248,52947044,76375976,34906152,46448938, 74191942,42829885,45986603,55144522,4031928,23557835,31423101,57953380,54447022,60682203,
46411259,85602018,27174286,93016201,3280747,64697231,80604091,35316708,32723153,17178486,28566710} 69243953,79571449,70828912,42703248,76375976,34906152,46448938,46411259,85602018,27174286,
61740673,93016201,3280747,64697231,80604091,35316708,32723153,17178486,28566710}
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
--adjust --adjust
...@@ -39,7 +40,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -39,7 +40,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
CUNGUI.RegisteredMonsters:AddCard(c) CUNGUI.RegisteredMonsters:AddCard(c)
--search --search
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3431737,0)) e1:SetDescription(aux.Stringid(66666004,4))
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCost(CUNGUI.cost) e1:SetCost(CUNGUI.cost)
...@@ -54,12 +55,11 @@ function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,12 +55,11 @@ function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk) function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local add=0 local add=0
if not CUNGUI.DiceInit then if not CUNGUI.RandomSeedInit then
CUNGUI.DiceInit=true CUNGUI.RandomSeedInit = true
local a1,a2,a3,a4,a5=Duel.TossDice(tp,5) Duel.LoadScript("random.lua")
local a6,a7,a8,a9,a10=Duel.TossDice(tp,5) math.randomseed(_G.RANDOMSEED)
local x=a1^10+a2^9+a3^8+a4^7+a5^6+a6^5+a7^4+a8^3+a9^2+a10 for i=1,10 do math.random(1000) end
math.randomseed(x)
end end
while add==0 do while add==0 do
local code=math.random(#CUNGUI.forbidden) local code=math.random(#CUNGUI.forbidden)
......
...@@ -30,6 +30,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -30,6 +30,7 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetDescription(aux.Stringid(66666004,5))
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0x7f-LOCATION_ONFIELD) e1:SetRange(0x7f-LOCATION_ONFIELD)
e1:SetCondition(CUNGUI.spcon) e1:SetCondition(CUNGUI.spcon)
......
...@@ -28,7 +28,6 @@ Duel.SelectTarget = function(tp,f,tp2,s,o,min,max,ex,...) ...@@ -28,7 +28,6 @@ Duel.SelectTarget = function(tp,f,tp2,s,o,min,max,ex,...)
local g1=SelectTarget(tp,nil,tp2,0x7f,0,0,max,nil,...) or Group.CreateGroup() local g1=SelectTarget(tp,nil,tp2,0x7f,0,0,max,nil,...) or Group.CreateGroup()
local g2=SelectTarget(tp,nil,tp2,0,0x7f,0,max,nil,...) or Group.CreateGroup() local g2=SelectTarget(tp,nil,tp2,0,0x7f,0,max,nil,...) or Group.CreateGroup()
g3=Group.CreateGroup() g3=Group.CreateGroup()
g3:Merge(g1) g3:Merge(g1)
g3:Merge(g2) g3:Merge(g2)
until g3 and #g3>=min and #g3<=max until g3 and #g3>=min and #g3<=max
...@@ -38,8 +37,8 @@ local DiscardHand = Duel.DiscardHand ...@@ -38,8 +37,8 @@ local DiscardHand = Duel.DiscardHand
Duel.DiscardHand = function(tp,f,min,max,reason) Duel.DiscardHand = function(tp,f,min,max,reason)
local g3=Group.CreateGroup() local g3=Group.CreateGroup()
repeat repeat
local g1=SelectMatchingCard(tp,Card.IsDiscardable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup() local g1=SelectMatchingCard(tp,Card.IsDiscardable,tp,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsDiscardable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup() local g2=SelectMatchingCard(tp,Card.IsDiscardable,tp,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup() g3=Group.CreateGroup()
g3:Merge(g1) g3:Merge(g1)
...@@ -51,8 +50,8 @@ local SelectReleaseGroup = Duel.SelectReleaseGroup ...@@ -51,8 +50,8 @@ local SelectReleaseGroup = Duel.SelectReleaseGroup
Duel.SelectReleaseGroup = function(tp,f,min,max,ex,...) Duel.SelectReleaseGroup = function(tp,f,min,max,ex,...)
local g3=Group.CreateGroup() local g3=Group.CreateGroup()
repeat repeat
local g1=SelectMatchingCard(tp,Card.IsReleasable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup() local g1=SelectMatchingCard(tp,Card.IsReleasable,tp,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsReleasable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup() local g2=SelectMatchingCard(tp,Card.IsReleasable,tp,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup() g3=Group.CreateGroup()
g3:Merge(g1) g3:Merge(g1)
...@@ -65,8 +64,8 @@ local SelectReleaseGroupEx = Duel.SelectReleaseGroupEx ...@@ -65,8 +64,8 @@ local SelectReleaseGroupEx = Duel.SelectReleaseGroupEx
Duel.SelectReleaseGroupEx = function(tp,f,min,max,ex,...) Duel.SelectReleaseGroupEx = function(tp,f,min,max,ex,...)
local g3=Group.CreateGroup() local g3=Group.CreateGroup()
repeat repeat
local g1=SelectMatchingCard(tp,Card.IsReleasable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup() local g1=SelectMatchingCard(tp,Card.IsReleasable,tp,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsReleasable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup() local g2=SelectMatchingCard(tp,Card.IsReleasable,tp,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup() g3=Group.CreateGroup()
g3:Merge(g1) g3:Merge(g1)
......
...@@ -64,7 +64,7 @@ end ...@@ -64,7 +64,7 @@ end
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local p=1-Duel.RockPaperScissors() local p=1-Duel.RockPaperScissors()
local g=Duel.GetFieldGroup(p,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE) local g=Duel.GetFieldGroup(p,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE,0)
Duel.Remove(g,POS_FACEDOWN,REASON_RULE) Duel.Remove(g,POS_FACEDOWN,REASON_RULE)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1) Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -38,13 +38,11 @@ function CUNGUI.RegisterMonsterSpecialEffects(c) ...@@ -38,13 +38,11 @@ function CUNGUI.RegisterMonsterSpecialEffects(c)
--change code --change code
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(89312388,0)) e1:SetDescription(aux.Stringid(89312388,0))
e1:SetCountLimit(1,87654321)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetTarget(CUNGUI.target) e1:SetTarget(CUNGUI.target)
e1:SetOperation(CUNGUI.operation) e1:SetOperation(CUNGUI.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function CUNGUI.filter(c) function CUNGUI.filter(c)
...@@ -57,7 +55,7 @@ function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,7 +55,7 @@ function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk) function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectMatchingCard(tp,CUNGUI.filter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,CUNGUI.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if not g or #g == 0 then return end if not g or #g == 0 then return end
local c = g:GetFirst() local c = g:GetFirst()
local code = Duel.AnnounceCard(tp,TYPE_MONSTER) local code = Duel.AnnounceCard(tp,TYPE_MONSTER)
......
...@@ -62,12 +62,11 @@ function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -62,12 +62,11 @@ function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk) function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local add=0 local add=0
if not CUNGUI.DiceInit then if not CUNGUI.RandomSeedInit then
CUNGUI.DiceInit=true CUNGUI.RandomSeedInit = true
local a1,a2,a3,a4,a5=Duel.TossDice(tp,5) Duel.LoadScript("random.lua")
local a6,a7,a8,a9,a10=Duel.TossDice(tp,5) math.randomseed(_G.RANDOMSEED)
local x=a1*6^10+a2*6^9+a3*6^8+a4*6^7+a5*6^6+a6*6^5+a7*6^4+a8*6^3+a9*6^2+a10*6 for i=1,10 do math.random(1000) end
math.randomseed(x)
end end
while add<2 do while add<2 do
local code=math.random(#CUNGUI.ZexalWeapons) local code=math.random(#CUNGUI.ZexalWeapons)
......
...@@ -38,7 +38,7 @@ end ...@@ -38,7 +38,7 @@ end
CUNGUI.RuleCard={} CUNGUI.RuleCard={}
function CUNGUI.RegisterCardRule(tp) function CUNGUI.RegisterCardRule(tp)
local c=Duel.CreateToken(tp,3285551) local c=Duel.CreateToken(tp,65830223)
Duel.Remove(c,POS_FACEUP,REASON_RULE) Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c CUNGUI.RuleCard[tp]=c
--damage --damage
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
--这场决斗中这些卡不是表侧表示除外的场合,这张卡表侧表示除外。 --这场决斗中这些卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这些卡得到以下效果。 --这些卡得到以下效果。
--这个效果的发动和效果不会被无效化。 --这个效果的发动和效果不会被无效化。
--宣言1个卡名才能发动。 --宣言1个【贤者之石-萨巴希尔】以外的卡名才能发动。
--这张卡撕碎,那个卡名的卡从卡组外加入手卡·额外卡组。 --这张卡撕碎,那个卡名的卡从卡组外加入手卡·额外卡组。
--这场决斗中,双方因这个效果加入的卡造成的效果伤害变为0。 --这场决斗中,因这个效果加入的卡造成的效果伤害变为0。
--(即使发生过位置移动,也视为同一张卡) --(即使发生过位置移动,也视为同一张卡)
CUNGUI = {} CUNGUI = {}
...@@ -75,7 +75,6 @@ end ...@@ -75,7 +75,6 @@ end
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.CreateToken(tp,e:GetLabel()) local c=Duel.CreateToken(tp,e:GetLabel())
CUNGUI.RuleCard[tp]:RemoveCard(e:GetHandler()) CUNGUI.RuleCard[tp]:RemoveCard(e:GetHandler())
Debug.Message(c)
CUNGUI.CreatedCard[c]=true CUNGUI.CreatedCard[c]=true
Duel.Exile(e:GetHandler(),REASON_RULE) Duel.Exile(e:GetHandler(),REASON_RULE)
Duel.SendtoHand(c,nil,REASON_EFFECT) Duel.SendtoHand(c,nil,REASON_EFFECT)
...@@ -84,6 +83,6 @@ end ...@@ -84,6 +83,6 @@ end
function CUNGUI.damval(e,re,val,r,rp,rc) function CUNGUI.damval(e,re,val,r,rp,rc)
if not re then return val end if not re then return val end
local c=re:GetHandler() local c=re:GetHandler()
if bit.band(r,REASON_EFFECT)~=0 and c and CUNGUI.CreatedCard[c] then return 0 if (r & REASON_EFFECT)~=0 and c and CUNGUI.CreatedCard[c] then return 0
else return val end else return val end
end end
--村规决斗:随机附赠 --村规决斗:随机附赠2
--入连锁的效果处理的场合, --入连锁的效果处理的场合,
--那个效果处理后,随机选1张自己目前控制的卡的效果中 --那个效果处理后,随机选1张自己目前控制的卡的效果中
--1个当前可处理的效果的发动时的代价和效果,进行处理。 --1个当前可处理的效果的发动时的代价和效果,进行处理。
......
...@@ -19,7 +19,7 @@ function Auxiliary.PreloadUds() ...@@ -19,7 +19,7 @@ function Auxiliary.PreloadUds()
e1:SetOperation(CUNGUI.AdjustOperation) e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0) Duel.RegisterEffect(e1,0)
--adjust --adjust
local e1=Effect.GlobalEffect() e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST) e1:SetCode(EVENT_ADJUST)
...@@ -41,7 +41,7 @@ function CUNGUI.RegisterRuleEffect(c) ...@@ -41,7 +41,7 @@ function CUNGUI.RegisterRuleEffect(c)
e2:SetCode(EVENT_ADJUST) e2:SetCode(EVENT_ADJUST)
e2:SetCondition(CUNGUI.condition) e2:SetCondition(CUNGUI.condition)
e2:SetOperation(CUNGUI.operation) e2:SetOperation(CUNGUI.operation)
Duel.RegisterEffect(e2,0) Duel.RegisterEffect(e2,c:GetControler())
end end
function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp)
...@@ -50,6 +50,7 @@ function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +50,7 @@ function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp)
CUNGUI.disabled[tp]=false CUNGUI.disabled[tp]=false
return false return false
end end
return true
end end
function CUNGUI.filter(c) function CUNGUI.filter(c)
return CUNGUI.RuleCards:IsContains(c) return CUNGUI.RuleCards:IsContains(c)
......
--村规决斗:孪生兄弟 --村规决斗:孪生兄弟
--所有额外卡组的卡(开始游戏后送去额外的灵摆卡不算)得到以下效果: --所有额外卡组的卡(开始游戏后送去额外的灵摆卡不算)得到以下效果:
--这张卡特殊召唤成功的场合发动。 --这张卡特殊召唤成功的场合发动。
--将1张这张卡原本卡名的同名卡从卡组外加入额外卡组,将用于这张卡特殊召唤的一组素材无视召唤条件特殊召唤到场上。 --将1张这张卡原本卡名的同名卡从卡组外加入额外卡组,
--将这场决斗中上次用于这张卡特殊召唤的一组素材无视召唤条件从任何区域特殊召唤到场上。
CUNGUI = {} CUNGUI = {}
......
...@@ -7,9 +7,11 @@ ...@@ -7,9 +7,11 @@
--3:跳过自己的下个主要阶段1。 --3:跳过自己的下个主要阶段1。
--4:跳过自己的下个主要阶段2。 --4:跳过自己的下个主要阶段2。
--5:跳过自己的下个战斗阶段。 --5:跳过自己的下个战斗阶段。
--6:无事发生 --6:跳过自己的下个回合
--这个效果从T2开始发动和处理。 --这个效果从T2开始发动和处理。
--细则:投掷到6的场合,会因为未经过结束阶段而跳过1次投掷。
CUNGUI = {} CUNGUI = {}
function Auxiliary.PreloadUds() function Auxiliary.PreloadUds()
...@@ -50,7 +52,6 @@ end ...@@ -50,7 +52,6 @@ end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp)
local dice=Duel.TossDice(tp,1) local dice=Duel.TossDice(tp,1)
if dice==6 then return end
local code=EFFECT_SKIP_DP local code=EFFECT_SKIP_DP
if dice==2 then code=EFFECT_SKIP_SP end if dice==2 then code=EFFECT_SKIP_SP end
if dice==3 then code=EFFECT_SKIP_M1 end if dice==3 then code=EFFECT_SKIP_M1 end
...@@ -62,7 +63,14 @@ function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +63,14 @@ function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetCode(code) e1:SetCode(code)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_PHASE+PHASE_END,2)
Duel.RegisterEffect(e1,tp) if dice==6 then
e1:SetCode(EFFECT_SKIP_TURN)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_OPPO_TURN)
e1:SetTargetRange(0,1)
Duel.RegisterEffect(e1,1-tp)
else
Duel.RegisterEffect(e1,tp)
end
end end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp) function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
......
--村规决斗:幻神之战
--开局时,双方将1张缚神冢(269012)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--自己结束阶段发动。从卡组外将1张随机5星通常怪兽在自己场上表侧表示放置。
--如果放置的卡是狮子男巫(4392470) 海马兽(47922711) 莫林芬(55784832)
--再给予对方4000点伤害。
CUNGUI = {}
function Auxiliary.PreloadUds()
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
function CUNGUI.AdjustOperation()
if not CUNGUI.INIT then
CUNGUI.INIT = true
CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1)
Duel.LoadScript("random.lua")
math.randomseed(_G.RANDOMSEED)
for i=1,10 do math.random(1000) end
end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[1] and (not CUNGUI.RuleCard[1]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[1]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[1],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[0] and not CUNGUI.RuleCard[0]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[0],POS_FACEUP)
end
if CUNGUI.RuleCard[1] and not CUNGUI.RuleCard[1]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[1],POS_FACEUP)
end
end
CUNGUI.RuleCard={}
function CUNGUI.RegisterCardRule(tp)
local c=Duel.CreateToken(tp,269012)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
--forbid
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66666004,4))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetCountLimit(1)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_REMOVED)
e1:SetOperation(CUNGUI.ruleop)
c:RegisterEffect(e1)
end
CUNGUI.cards={2971090,4035199,4179849,4392470,7562372,10538007,11250655,11714098,12146024,14977074,15023985,16972957,17192817,18246479,19474136,19737320,20624263,26378150,28279543,28546905,29172562,29402771,29616941,30090452,31477025,32012841,32012842,32344688,33178416,33621868,33878931,34690519,35322812,35565537,36904469,38116136,40155554,42418084,42599677,43785278,43793530,44865098,47319141,47922711,48202661,48365709,48766543,49587396,50176820,50407691,51194046,51228280,52584282,54615781,55291359,55784832,55998462,62762898,65518099,66989694,67273917,67284908,67494157,68182934,68339286,69455834,69893315,70345785,73051941,73081602,73911410,74637266,75622825,75850803,76634149,77998771,78060096,78780140,80141480,81386177,81686058,82818645,85326399,85771020,86088138,87511987,90876561,96981563,97612389,98795934}
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local code=math.random(#CUNGUI.cards)
local c=Duel.CreateToken(tp,CUNGUI.cards[code])
if Duel.MoveToField(c,tp,tp,LOCATION_MZONE,POS_FACEUP,true) and (code==4392470 or code==47922711 or code==55784832) then
Duel.BreakEffect()
Duel.Damage(1-tp,4000,REASON_EFFECT)
end
end
--村规决斗:战争和平
--开局时,双方将1张灰篮撞击(2759860)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--这张卡的①②效果1回合只能有1次使用其中任意1个。
--①:1回合1次,自己主要阶段才能处理这个效果。选自己场上和对方场上1张卡破坏。
--②:1回合1次,自己结束阶段才能处理这个效果。从卡组选1张卡加入手卡。
--这些效果的处理不会被无效,且不受【不能加入手卡】类效果的影响。
CUNGUI = {}
function Auxiliary.PreloadUds()
--adjust
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
function CUNGUI.AdjustOperation()
if not CUNGUI.INIT then
CUNGUI.INIT = true
CUNGUI.RegisterCardRule(0)
CUNGUI.RegisterCardRule(1)
end
if CUNGUI.RuleCard[0] and (not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[0]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[1] and (not CUNGUI.RuleCard[1]:IsLocation(LOCATION_REMOVED) or not CUNGUI.RuleCard[1]:IsFaceup()) then
Duel.Remove(CUNGUI.RuleCard[1],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[0] and not CUNGUI.RuleCard[0]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[0],POS_FACEUP)
end
if CUNGUI.RuleCard[1] and not CUNGUI.RuleCard[1]:IsFaceup() then
Duel.ChangePosition(CUNGUI.RuleCard[1],POS_FACEUP)
end
end
CUNGUI.RuleCard={}
function CUNGUI.RegisterCardRule(tp)
local c=Duel.CreateToken(tp,3285551)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
--forbid
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66666004,4))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,66666666)
e1:SetProperty(EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetRange(LOCATION_REMOVED)
e1:SetCondition(CUNGUI.rulecond)
e1:SetOperation(CUNGUI.ruleop)
c:RegisterEffect(e1)
end
function CUNGUI.rulecond(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentChain()<1 and
(((Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2)
and Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)*Duel.GetFieldGroupCount(1-tp,LOCATION_ONFIELD,0)>0)
or (Duel.GetCurrentPhase()==PHASE_END and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0))
end
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetCurrentPhase()==PHASE_END then
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_DECK,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_RULE)
else
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,0,1,1,nil)
local g2=Duel.SelectMatchingCard(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
g:Merge(g2)
Duel.Destroy(g,REASON_EFFECT)
end
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