Commit 477b520d authored by JoyJ's avatar JoyJ

update srv5555 and normal_up

parent 20460782
--村规决斗:万物创世
--游戏开始时,各自从卡组外将1张【万物创世龙】加入双方手卡。
--场上·手卡以外的卡有【万物创世龙】的场合(无论表侧还是里侧表示),那些【万物创世龙】加入手卡。
--万物创世龙的效果修改:
--这张卡不能通常召唤。把自己场上攻击力与守备力数值合计不为0的任意数量的怪兽解放的场合才能特殊召唤。
--①:这个方法特殊召唤的这张卡的攻击力·守备力变成解放的怪兽的攻击力·守备力合计数值。这个效果不会被无效化。
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:SetCountLimit(1)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
--return
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetOperation(CUNGUI.AdjustOperation2)
Duel.RegisterEffect(e2,0)
end
CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation2(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(Card.IsCode,0,0x7f-LOCATION_HAND-LOCATION_ONFIELD,0x7f-LOCATION_HAND-LOCATION_ONFIELD,nil,10000)
if #g > 0 then
Duel.SendtoHand(g,nil,REASON_RULE+REASON_RETURN)
end
end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if not CUNGUI.INIT then
CUNGUI.INIT = true
local card1 = Duel.CreateToken(0,10000)
local card2 = Duel.CreateToken(1,10000)
CUNGUI.RegisteredMonsters:AddCard(card1)
CUNGUI.RegisteredMonsters:AddCard(card2)
Duel.SendtoHand(card1, nil, REASON_RULE)
Duel.SendtoHand(card2, nil, REASON_RULE)
end
e:Reset()
--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)
end
function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c)
aux.EnableChangeCode(c,32274490,LOCATION_GRAVE)
end
\ No newline at end of file
--村规决斗:丢三落四
--任何效果进行处理时,
--从自己卡组最上方将1张卡送去墓地。
CUNGUI = {}
local OrigSO = Effect.SetOperation
Effect.SetOperation = function(e,func)
local typ = e:GetType()
if not typ or (typ & 0x7d0)==0 then
if func then return func(e,tp,eg,ep,ev,re,r,rp) end
return
end
OrigSO(e,function (e,tp,eg,ep,ev,re,r,rp)
Duel.DiscardDeck(tp,1,REASON_EFFECT)
if func then return func(e,tp,eg,ep,ev,re,r,rp) end
end)
end
function Auxiliary.PreloadUds()
end
--村规决斗:以卡为友
--开局时,双方将1张卖棺者(65830223)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--原本持有者是自己的卡被送去墓地或被除外的场合,自己受到那个数量x300的伤害。
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
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(65830223,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetRange(LOCATION_REMOVED)
e2:SetOperation(CUNGUI.operation)
c:RegisterEffect(e2)
local e1=e2:Clone()
e1:SetCode(EVENT_REMOVE)
c:RegisterEffect(e1)
end
function CUNGUI.filter(c,tp)
return c:GetOwner()==tp
end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp)
local g=eg:Filter(CUNGUI.filter,nil,tp)
if #g<1 then return end
Duel.Damage(tp,#g*300,REASON_EFFECT)
end
--村规决斗:伟大领袖
--开局时,双方各自从卡组·额外卡组选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:SetCountLimit(1)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
local CRegisterEffect=Card.RegisterEffect
Card.RegisterEffect = function(c,e,forced)
if not e:GetDescription() then
e:SetDescription(aux.Stringid(66666004,4))
end
return CRegisterEffect(c,e,forced)
end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
CUNGUI.Init = true
local tc=Duel.SelectMatchingCard(0,nil,0,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst()
local cc=Duel.SelectMatchingCard(1,nil,1,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil):GetFirst()
Duel.ConfirmCards(1,tc)
Duel.ConfirmCards(0,cc)
Duel.ShuffleDeck(0)
Duel.ShuffleDeck(1)
local tce=_G["c"..tc:GetOriginalCode()]
if tce and tce.initial_effect then
local g=Duel.GetMatchingGroup(nil,0,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,nil)
for c in aux.Next(g) do
tce.initial_effect(c)
end
end
local cce=_G["c"..cc:GetOriginalCode()]
if cce and cce.initial_effect then
local g=Duel.GetMatchingGroup(nil,1,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA,0,nil)
for c in aux.Next(g) do
cce.initial_effect(c)
end
end
e:Reset()
end
--村规决斗:即刻开摆
--游戏开始时,各自从卡组外将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:SetCountLimit(1)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
CUNGUI.RegisteredMonsters = Group.CreateGroup()
function CUNGUI.AdjustOperation2(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(Card.IsCode,0,0x7f-LOCATION_HAND-LOCATION_ONFIELD,0x7f-LOCATION_HAND-LOCATION_ONFIELD,nil,10000)
if #g > 0 then
Duel.SendtoHand(g,REASON_RULE+REASON_RETURN)
end
end
function CUNGUI.InitPlayer(tp)
local origE=Card.RegisterEffect
local origDE=Duel.RegisterEffect
Card.RegisterEffect = function() return false end
Duel.RegisterEffect = function() return false end
local card1 = Duel.CreateToken(tp,22211622)
local card2 = Duel.CreateToken(tp,96227613)
Duel.MoveToField(card1,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
Duel.MoveToField(card2,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
local g=Group.CreateGroup()
g:AddCard(card1)
g:AddCard(card2)
g:KeepAlive()
Card.RegisterEffect=origE
Duel.RegisterEffect=origDE
--return
local e2=Effect.CreateEffect(card1)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_ADJUST)
e2:SetLabelObject(g)
e2:SetOperation(CUNGUI.PCardReturnToField)
Duel.RegisterEffect(e2,tp)
end
function CUNGUI.PCardReturnToField(e,tp)
local g=e:GetLabelObject()
local pzcard=Duel.GetFieldGroup(tp,LOCATION_PZONE,0)
for tc in aux.Next(pzcard) do
if not g:IsContains(tc) then
Duel.SendtoExtraP(tc,nil,REASON_RULE)
end
end
for tc in aux.Next(g) do
if not tc:IsLocation(LOCATION_PZONE) then
Duel.MoveToField(tc,tp,tp,LOCATION_PZONE,POS_FACEUP,true)
end
end
end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if not CUNGUI.INIT then
CUNGUI.INIT = true
CUNGUI.InitPlayer(0)
CUNGUI.InitPlayer(1)
end
end
\ No newline at end of file
--村规决斗:命运抽卡
--开局时,双方将1张红龙(56789759)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--自己因通常抽卡以外抽卡的场合,如果卡组的数量在要抽的卡的数量以上,改为从卡组选卡加入手卡。
--自己通常抽卡的场合,如果卡组的数量在要抽的卡的数量以上,改为从卡组选卡加入手卡。
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)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,LOCATION_HAND)
Duel.SendtoDeck(g,nil,2,REASON_RULE)
Duel.Draw(0,5,REASON_RULE)
Duel.Draw(1,5,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,56789759)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
--search
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27564031,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(CUNGUI.condition)
e2:SetTarget(CUNGUI.target)
e2:SetOperation(CUNGUI.operation)
c:RegisterEffect(e2)
end
function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function CUNGUI.filter(c)
return c:IsSetCard(0x23) and c:IsAbleToHand()
end
function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dt=Duel.GetDrawCount(tp)
if chk==0 then return dt>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=dt end
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
e:SetLabel(dt)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
local OrigDraw = Duel.Draw
Duel.Draw = function(tp,count,reason)
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<count then
OrigDraw(tp,dt,reason)
return
end
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,count,count,nil)
Duel.SendtoHand(g,tp,REASON_DRAW | reason)
end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax then return end
local dt=e:GetLabel()
if Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)<dt then
OrigDraw(tp,dt,REASON_RULE)
return
end
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_DECK,0,dt,dt,nil)
Duel.SendtoHand(g,tp,REASON_DRAW+REASON_RULE)
end
\ No newline at end of file
--村规决斗:天变地异
--开局时,双方将1张【天变地异】(62966332)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--只要这张卡在除外状态,双方将卡组反转进行决斗。
--每个回合开始时,回合玩家选择以下一项:
--·从自己的卡组通常抽卡
--·作为通常抽卡的代替,从对方的卡组最上方抽取2张卡。
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,62966332)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
Duel.EnableGlobalFlag(GLOBALFLAG_DECK_REVERSE_CHECK)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_REVERSE_DECK)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,0)
Duel.RegisterEffect(e2,0)
e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(27564031,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PREDRAW)
e2:SetRange(LOCATION_REMOVED)
e2:SetCondition(CUNGUI.condition)
e2:SetTarget(CUNGUI.target)
e2:SetOperation(CUNGUI.operation)
c:RegisterEffect(e2)
end
function CUNGUI.condition(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer() and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>0
and Duel.GetDrawCount(tp)>0
end
function CUNGUI.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_DECK)>1 end
local dt=Duel.GetDrawCount(tp)
if dt~=0 then
aux.DrawReplaceCount=0
aux.DrawReplaceMax=dt
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_DRAW_COUNT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_DRAW)
e1:SetValue(0)
Duel.RegisterEffect(e1,tp)
end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,0,LOCATION_DECK)
end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp)
aux.DrawReplaceCount=aux.DrawReplaceCount+1
if aux.DrawReplaceCount>aux.DrawReplaceMax or not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetDecktopGroup(1-tp,2)
Duel.SendtoHand(g,tp,REASON_RULE+REASON_DRAW)
end
--村规决斗:娱乐决斗
--开局时,双方的基本分变为100。这场决斗中,双方受到的伤害变为0,失去·改变基本分的动作不进行。
--这场决斗中,在第7个回合之前,即使基本分为0也不会决斗败北;
--在第7个回合开始后,基本分较少的一方会开始受到伤害。
--进行某些动作时,基本分作出相应变更。
--怪兽的攻击宣言:同一回合的攻击次数越多,那次攻击的加分越多:+1 +2 +4 +8 +16 +32 +32 +32……
--召唤怪兽:同一回合的召唤次数越多加分越多:+1 +3 +9 +9 +9……
--特殊召唤:同一回合的特殊召唤次数,增益递减:+3 +2 +1 +0 -1 -2 -3 -4……
--即将造成效果伤害:每次+1,每有200点额外+1。
--即将回复生命:那个效果回复的生命值变为原来的百分之一,向上取整。
--支付和失去生命:生命值不变化。
--自己场上的卡数量增加:增加数量越多,加分越多:+0 +2 +4 +8 +16 +32 +32 +32……
--对方场上的卡数量减少:减少数量越多,加分越多:+0 +1 +2 +4 +8 +16 +32 +32 +32……
--决斗开始时,每位玩家将1张【笑容世界】从卡组外从游戏中除外,这张卡在收到观战者的打赏/指指点点的场合才能发动,其发动和效果不能被无效化。
--观战者可以在主要阶段宣言对回合玩家进行打赏(+10基本分)。每位观战者在1场决斗中只能对1名决斗者打赏,每场决斗中每位观众的打赏只能进行1次。
--观战者可以在主要阶段宣言对回合玩家进行指指点点(-10基本分)。每位观战者在1场决斗中只能对1名决斗者指指点点,每场决斗中每位观众的指指点点只能进行1次。
Duel.CheckLPCost = function(player,cost) return true end
Duel.PayLPCost = function(player,cost) end
local OrigDuelSetLP = Duel.SetLP
Duel.SetLP = function(player,lp) end
local RuleRecover = function(tp,lp)
OrigDuelSetLP(tp,Duel.GetLP(tp)+lp)
end
local OrigDuelRecover = Duel.Recover
Duel.Recover = function(player,value,reason,is_step)
value = math.ceil(value / 100)
RuleRecover(player,value)
end
local OrigDuelDamage = Duel.Damage
Duel.Damage = function(player,value,reason,is_step)
if value>0 then
value=1+math.floor(value/200)
RuleRecover(1-player,value)
end
end
CUNGUI = {}
CUNGUI.RuleCard = {}
function CUNGUI.CreateSmileWorld(tp)
local c=Duel.CreateToken(tp,2099841)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
--add
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(545781,0))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_REMOVED)
e1:SetOperation(CUNGUI.smileop)
c:RegisterEffect(e1)
--minus
e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetDescription(aux.Stringid(545781,1))
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_NEGATE)
e1:SetRange(LOCATION_REMOVED)
e1:SetOperation(CUNGUI.smileop2)
c:RegisterEffect(e1)
end
function CUNGUI.smileop(e,tp,eg,ep,ev,re,r,rp)
RuleRecover(tp,10)
end
function CUNGUI.smileop2(e,tp,eg,ep,ev,re,r,rp)
RuleRecover(tp,-10)
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.AdjustOperationOncePerTurn)
Duel.RegisterEffect(e1,0)
--adjust
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)
e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CHANGE_DAMAGE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetValue(CUNGUI.val)
Duel.RegisterEffect(e1,0)
e1=e1:Clone()
Duel.RegisterEffect(e1,1)
end
function CUNGUI.val(e,re,val,r,rp,rc)
if Duel.GetTurnCount()<7 then
return 0
end
local tp = e:GetHandlerPlayer()
if Duel.GetLP(tp)<Duel.GetLP(1-tp) then
return val
end
return 0
end
CUNGUI.FieldCount={}
CUNGUI.FieldCount[0]=0
CUNGUI.FieldCount[1]=0
CUNGUI.SummonCount={}
CUNGUI.SummonCount[0]=0
CUNGUI.SummonCount[1]=0
CUNGUI.SPSummonCount={}
CUNGUI.SPSummonCount[0]=0
CUNGUI.SPSummonCount[1]=0
CUNGUI.AttackCount={}
CUNGUI.AttackCount[0]=0
CUNGUI.AttackCount[1]=0
function CUNGUI.AdjustOperationOncePerTurn(e,tp,eg,ep,ev,re,r,rp)
CUNGUI.SummonCount[0]=0
CUNGUI.SummonCount[1]=0
CUNGUI.SPSummonCount[0]=0
CUNGUI.SPSummonCount[1]=0
CUNGUI.AttackCount[0]=0
CUNGUI.AttackCount[1]=0
end
function CUNGUI.cond()
return Duel.GetTurnCount()<7
end
function CUNGUI.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
if not CUNGUI.Init then
CUNGUI.Init = true
for i=0,1 do
CUNGUI.CreateSmileWorld(i)
end
local e0 = Effect.GlobalEffect()
e0:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e0:SetCode(EFFECT_CANNOT_LOSE_KOISHI)
e0:SetTargetRange(1,1)
e0:SetCondition(CUNGUI.cond)
Duel.RegisterEffect(e0,0)
OrigDuelSetLP(0,100)
OrigDuelSetLP(1,100)
end
for i=0,1 do
if CUNGUI.RuleCard[tp] and not (CUNGUI.RuleCard[tp]:IsLocation(LOCATION_REMOVED)) then
Duel.Remove(CUNGUI.RuleCard[tp],POS_FACEUP,REASON_RULE)
end
local scount = Duel.GetActivityCount(i,ACTIVITY_NORMALSUMMON)
if scount > CUNGUI.SummonCount[i] then
CUNGUI.SummonCount[i]=scount
local lp=3^(scount-1)
if lp > 9 then lp = 9 end
RuleRecover(i,lp)
end
local spcount = Duel.GetActivityCount(i,ACTIVITY_SPSUMMON)
if spcount > CUNGUI.SPSummonCount[i] then
CUNGUI.SPSummonCount[i]=spcount
local lp=4-spcount
RuleRecover(i,lp)
end
local atkcount = Duel.GetActivityCount(i,ACTIVITY_ATTACK)
if atkcount > CUNGUI.AttackCount[i] then
CUNGUI.AttackCount[i]=atkcount
local lp=2^(atkcount-1)
if lp > 32 then lp = 32 end
RuleRecover(i,lp)
end
local fcount = Duel.GetFieldGroupCount(i,LOCATION_ONFIELD,0)
if fcount < CUNGUI.FieldCount[i] then
local diff=CUNGUI.FieldCount[i]-fcount
CUNGUI.FieldCount[i]=fcount
if diff > 1 then
local lp=2^(diff-2)
if lp > 32 then lp = 32 end
RuleRecover(1-i,lp)
end
elseif fcount > CUNGUI.FieldCount[i] then
local diff=fcount-CUNGUI.FieldCount[i]
CUNGUI.FieldCount[i]=fcount
if diff > 1 then
local lp=2^(diff-1)
if lp > 32 then lp = 32 end
RuleRecover(i,lp)
end
end
end
end
function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c)
--search
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(3431737,0))
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCost(CUNGUI.cost)
e1:SetProperty(EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetOperation(CUNGUI.operation)
c:RegisterEffect(e1)
end
function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return c:IsAbleToRemoveAsCost() end
Duel.Remove(c, POS_FACEDOWN,REASON_COST)
end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local code=math.random(#CUNGUI.forbidden)
local tc=Duel.CreateToken(tp,code)
if tc then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
--村规决斗:孤胆英雄
--所有怪兽得到以下效果:
--这张卡可以支付一半生命值,在对方场上守备表示特殊召唤。
--自己场上的怪兽只有这张卡的场合,这张卡不受其他卡的效果影响。
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:SetCountLimit(1)
e1:SetOperation(CUNGUI.AdjustOperation)
Duel.RegisterEffect(e1,0)
end
CUNGUI.RegisteredMonsters = Group.CreateGroup()
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_MZONE,LOCATION_DECK+LOCATION_HAND+LOCATION_EXTRA+LOCATION_MZONE,nil,TYPE_MONSTER)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
end
function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c)
--immune
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_IMMUNE_EFFECT)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetCondition(CUNGUI.imcon)
e1:SetValue(CUNGUI.efilter)
c:RegisterEffect(e1)
--special summon
e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_SPSUM_PARAM)
e1:SetRange(LOCATION_HAND)
e1:SetTargetRange(POS_FACEUP_DEFENSE,1)
e1:SetCondition(CUNGUI.spcon)
e1:SetOperation(CUNGUI.spop)
c:RegisterEffect(e1)
end
function CUNGUI.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(1-tp,LOCATION_MZONE,tp)>0
and Duel.IsPlayerCanSpecialSummonCount(tp,1)
end
function CUNGUI.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function CUNGUI.imcon(e)
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)==1
end
function CUNGUI.efilter(e,te)
return te:GetOwner()~=e:GetOwner()
end
\ No newline at end of file
--村规决斗:崇颂之仪
--开局时,双方将1张阿拉弥赛亚之仪(3285551)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--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={}
CUNGUI.ForbiddenEffects={}
CUNGUI.ForbiddenEffects[0]={}
CUNGUI.ForbiddenEffects[1]={}
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)
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.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2) and Duel.GetCurrentChain()<1
end
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_HAND,0,1,99,nil)
local ct=Duel.SendtoDeck(g,nil,2,REASON_RULE)
Duel.Draw(tp,ct+1,REASON_RULE)
end
--村规决斗:星球大战
--开局时,双方将1张【星球改造】(73628505)从卡组外表侧表示除外。
--这场决斗中这张卡不是表侧表示除外的场合,这张卡表侧表示除外。
--这张卡得到以下效果。
--1回合最多10次,自己主要阶段才能发动这个效果。这个效果的发动和效果不会被无效化。
--从卡组外将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)
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={}
CUNGUI.FieldCards={269012,269510,295517,575512,675319,712559,975299,1003840,1050355,1061200,1127737,1295111,1801154,2084239,2106266,2144946,2819435,3113667,3576031,3875465,4064256,4215636,4357063,4545854,4740489,5050644,5697558,5833312,6909330,7142724,7617062,9547962,9989792,10080320,10424147,11102908,12215894,12644061,12931061,13035077,13301895,13482262,13764602,14001430,14289852,15854426,16269385,16625614,17000165,17228908,18114794,18161786,18720257,18890039,19162134,19384334,19814508,20216608,20720928,22198672,22555834,22702055,22751868,22829942,23160024,23213239,23377425,23424603,24382602,24793135,25163979,26232916,26493435,26534688,26920296,27564031,27813661,28120197,28126717,28388296,29400787,29650040,30761649,32354768,32391631,32999573,33017655,33550694,33773528,33814281,33900648,33981008,34103656,34487429,34572613,34822850,35371948,35487920,35546670,35815783,35956022,36099620,36668118,37322745,37694547,38053381,38057522,39730727,39838559,39910367,40005099,40089744,41128647,41418852,42015635,42461852,43034264,43175858,43912676,43940008,44139064,44352516,44710391,45383307,45778932,45943516,46500985,46552140,47355498,47596607,47679935,47870325,48015771,48179391,50005218,50186558,50433147,50913601,51208046,52518793,53039326,53527835,53819808,54250060,54306223,54631665,55553602,55742055,56063182,56074358,56111151,56433456,56594520,57554544,58012707,58406094,58793369,58924378,59048135,59054773,59160188,59197169,59687381,60448701,60514625,60884672,60946968,61557074,61583217,61654098,62188962,62200831,62265044,63035430,63492244,63883999,64213017,64230128,64400161,65589010,65959844,66399653,66750703,67237709,67328336,67331360,67616300,67831115,68462976,69039982,69217334,69296555,69408987,70122149,70222318,70422863,71645242,71650854,72043279,72283691,72772445,73206827,73787254,74665651,75041269,75304793,75782277,76136345,76375976,76473843,76871889,77297908,77584012,78082039,79555535,79698395,80921533,81231742,81380218,81777047,81788994,82999629,84171830,84335863,84504242,84792926,85638822,85668449,86318356,86643777,86997073,87430998,87624166,87902575,89264428,90011152,90173539,90351981,91027843,91228233,92223430,92481084,93031067,94243005,94317736,94585852,95376428,95477924,95658967,95856586,99543666,99795159}
function CUNGUI.RegisterCardRule(tp)
local c=Duel.CreateToken(tp,73628505)
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_IGNITION)
e1:SetCountLimit(10)
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
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.CreateToken(tp,CUNGUI.FieldCards[math.random(#CUNGUI.FieldCards)])
local te=tc:GetActivateEffect()
local fc=Duel.GetFieldCard(tp,LOCATION_FZONE,0)
if fc then
Duel.SendtoGrave(fc,REASON_RULE)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_FZONE,POS_FACEUP,true)
te:UseCountLimit(tp,1,true)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
--万物創世龍
function c10000.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_HAND)
e2:SetCondition(c10000.spcon)
e2:SetTarget(c10000.sptg)
e2:SetOperation(c10000.spop)
c:RegisterEffect(e2)
end
function c10000.rfilter(c,tp)
return c:IsControler(tp) or c:IsFaceup()
end
function c10000.sumfilter(c)
return c:IsReleasable() and c:GetAttack()+c:GetDefense()>0
end
function c10000.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetMatchingGroupCount(c10000.sumfilter,tp,LOCATION_MZONE,0,nil)>0
end
function c10000.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local rg=Duel.GetReleaseGroup(tp):Filter(c10000.rfilter,nil,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=rg:Select(tp,0,99,nil)
if sg and #sg>0 then
sg:KeepAlive()
e:SetLabelObject(sg)
e:SetLabel(sg:GetSum(Card.GetAttack)+sg:GetSum(Card.GetDefense))
return true
else return false end
end
function c10000.spop(e,tp,eg,ep,ev,re,r,rp,c)
local g=e:GetLabelObject()
Duel.Release(g,REASON_COST)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_CANNOT_NEGATE+EFFECT_FLAG_CANNOT_INACTIVATE+EFFECT_FLAG_UNCOPYABLE)
e1:SetValue(e:GetLabel())
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_SET_DEFENSE)
c:RegisterEffect(e2)
g:DeleteGroup()
end
--村规决斗:十倍凡骨
--双方场上的通常怪兽的攻击力·防御力上升那个原本攻击力x9。
CUNGUI = {}
function CUNGUI.Init()
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetLabel(0)
e1:SetValue(CUNGUI.val)
Duel.RegisterEffect(e1,0)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
e2:SetLabel(1)
Duel.RegisterEffect(e2,0)
end
function CUNGUI.filter(c,race)
return c:IsFaceup() and c:IsRace(race)
end
function CUNGUI.val(e,c)
if not c:IsType(TYPE_NORMAL) then return 0 end
local up = c:GetBaseAttack()*9
if e:GetLabel()==1 then up = c:GetBaseDefense()*9 end
return up
end
function Auxiliary.PreloadUds()
-- one more draw
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetCode(EVENT_ADJUST)
e1:SetOperation(function(e)
CUNGUI.Init()
e:Reset()
end)
Duel.RegisterEffect(e1,0)
end
\ No newline at end of file
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