Commit 3891601e authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:purerosefallen/specials

parents cb4875aa 51bd442c
--村规决斗:携手共尽
--所有起动效果和诱发即时效果变为双方都能使用的效果。
--后攻开局时多抽1张。
local OrigSetType = Effect.SetType
function Auxiliary.PreloadUds()
Effect.SetType = function(e,typ)
if (typ & EFFECT_TYPE_IGNITION)+(typ & EFFECT_TYPE_QUICK_O)>0 then
e:SetProperty(e:GetProperty() | EFFECT_FLAG_BOTH_SIDE)
end
OrigSetType(e,typ)
end
-- 1 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)
Duel.Draw(1,1,REASON_RULE)
e:Reset()
end)
Duel.RegisterEffect(e1,0)
end
\ No newline at end of file
--村规决斗:逆转裁判
--效果处理时,对方可以支付1000点基本分。
--那个效果处理完成后,对方以对方的视角再处理1次效果。
--细则:
--适用于任何效果,但处理后不一定有意义。
--比如旋风即使再处理一次效果,对象也不会有所改变;
--又比如天空侠虽然可以二次处理效果,但对方的卡组未必有合适的卡可拿。
local OrigRegister = Card.RegisterEffect
local OrigClone = Effect.Clone
CUNGUI = {}
CUNGUI.EffectSaver={}
function Auxiliary.PreloadUds()
Card.RegisterEffect = function(c,e,b)
local typ = e:GetType()
if (typ & 0x7d0)>0 and e:GetOperation()~=nil then
CUNGUI.EffectSaver[e] = e:GetOperation()
e:SetOperation(CUNGUI.Operation)
end
return OrigRegister(c,e,b)
end
Effect.Clone = function(e)
local ce = OrigClone(e)
if e:GetOperation() == CUNGUI.Operation then
ce:SetOperation(CUNGUI.EffectSaver[e])
end
return ce
end
end
function CUNGUI.Operation(e,tp,eg,ep,ev,re,r,rp)
local runDouble = false
if Duel.CheckLPCost(1-tp,1000) and Duel.SelectYesNo(1-tp,aux.Stringid(57496978,0)) then
Duel.PayLPCost(1-tp,1000)
runDouble = true
end
local result = CUNGUI.EffectSaver[e](e,tp,eg,ep,ev,re,r,rp)
if runDouble then
Duel.BreakEffect()
result = CUNGUI.EffectSaver[e](e,1-tp,eg,ep,ev,re,r,rp)
end
return result
end
--村规决斗:谁是小丑
--开局时,双方从卡组外将1张【娱乐法师 戏法小丑】表侧表示从游戏中除外。
--这张【娱乐法师 戏法小丑】得到以下效果。
--①自己准备阶段,这张卡不在场上的场合发动。
--投1个硬币。如果是正面,这张卡在自己场上特殊召唤,自己受到1000点伤害。
--③这张卡离开场上的场合从游戏中除外,不在场上存在的场合(比如作为超量素材)从游戏中除外。
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.RegisterForbiddenRule(0)
CUNGUI.RegisterForbiddenRule(1)
end
if CUNGUI.RuleCard[0] and not CUNGUI.RuleCard[0]:IsLocation(LOCATION_REMOVED+LOCATION_ONFIELD) then
Duel.Remove(CUNGUI.RuleCard[0],POS_FACEUP,REASON_RULE)
end
if CUNGUI.RuleCard[1] and not CUNGUI.RuleCard[1]:IsLocation(LOCATION_REMOVED+LOCATION_ONFIELD) 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.RegisterForbiddenRule(tp)
local c=Duel.CreateToken(tp,67696066)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_LEAVE_FIELD_REDIRECT)
e1:SetValue(LOCATION_REMOVED)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetDescription(aux.Stringid(102380,1))
e2:SetCategory(CATEGORY_DICE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_OVERLAY+LOCATION_DECK+LOCATION_HAND+LOCATION_GRAVE+LOCATION_REMOVED)
e2:SetCountLimit(1)
e2:SetCondition(CUNGUI.damcon)
e2:SetOperation(CUNGUI.damop)
c:RegisterEffect(e2)
end
function CUNGUI.damcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function CUNGUI.damop(e,tp,eg,ep,ev,re,r,rp)
local dice=Duel.TossCoin(tp,1)
if dice==1 then
if Duel.SpecialSummon(e:GetHandler(),0,tp,tp,false,false,POS_FACEUP)>0 then
Duel.Damage(tp,1000,REASON_EFFECT)
end
end
end
--村规决斗:献上祭品
--所有怪兽得到以下效果:
--这张卡可以把自己场上的表侧表示的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: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,0x7f,0x7f,nil,TYPE_MONSTER)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
end
function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c)
--spsummon proc
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(0x7f-LOCATION_ONFIELD)
e1:SetCondition(CUNGUI.spcon)
e1:SetOperation(CUNGUI.spop)
c:RegisterEffect(e1)
end
function CUNGUI.CreateFilter(c)
local race=c:GetRace()
local attr=c:GetAttribute()
return function(c)
return c:IsFaceup() and (c:IsRace(race) or c:IsAttribute(attr)) and c:IsAbleToGraveAsCost()
end
end
function CUNGUI.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-2
and Duel.IsExistingMatchingCard(CUNGUI.CreateFilter(e:GetHandler()),tp,LOCATION_MZONE,0,2,nil)
end
function CUNGUI.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,CUNGUI.CreateFilter(e:GetHandler()),tp,LOCATION_MZONE,0,2,2,nil)
Duel.SendtoGrave(g,REASON_COST)
end
\ No newline at end of file
--村规决斗:万物互联
--进行各种选卡动作时,
--可以选择双方的任何卡。
--每个回合把手卡抽到5张(最少为1)。
--细则:
--大部分情况下,并不改变卡片的发动条件;
--只是在选取对象和处理卡的选择时可以任意选。
CUNGUI = {}
local SelectMatchingCard = Duel.SelectMatchingCard
Duel.SelectMatchingCard = function(tp,f,tp2,s,o,min,max,ex,...)
local g3=Group.CreateGroup()
repeat
local g1=SelectMatchingCard(tp,nil,tp2,0x7f,0,0,max,nil,...) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,nil,tp2,0,0x7f,0,max,nil,...) or Group.CreateGroup()
g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
until g3 and #g3>=min and #g3<=max
return g3
end
local SelectTarget = Duel.SelectTarget
Duel.SelectTarget = function(tp,f,tp2,s,o,min,max,ex,...)
local g3=Group.CreateGroup()
repeat
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()
g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
until g3 and #g3>=min and #g3<=max
return g3
end
local DiscardHand = Duel.DiscardHand
Duel.DiscardHand = function(tp,f,min,max,reason)
local g3=Group.CreateGroup()
repeat
local g1=SelectMatchingCard(tp,Card.IsDiscardable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsDiscardable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
until g3 and #g3>=min and #g3<=max
Duel.SendtoGrave(g3,reason | REASON_DISCARD)
end
local SelectReleaseGroup = Duel.SelectReleaseGroup
Duel.SelectReleaseGroup = function(tp,f,min,max,ex,...)
local g3=Group.CreateGroup()
repeat
local g1=SelectMatchingCard(tp,Card.IsReleasable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsReleasable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
until g3 and #g3>=min and #g3<=max
return g3
end
local SelectReleaseGroupEx = Duel.SelectReleaseGroupEx
Duel.SelectReleaseGroupEx = function(tp,f,min,max,ex,...)
local g3=Group.CreateGroup()
repeat
local g1=SelectMatchingCard(tp,Card.IsReleasable,tp2,0x7f,0,0,max,nil) or Group.CreateGroup()
local g2=SelectMatchingCard(tp,Card.IsReleasable,tp2,0,0x7f,0,max,nil) or Group.CreateGroup()
g3=Group.CreateGroup()
g3:Merge(g1)
g3:Merge(g2)
until g3 and #g3>=min and #g3<=max
return g3
end
function Auxiliary.PreloadUds()
--Draw
local e2=Effect.GlobalEffect()
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_DRAW_COUNT)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetTargetRange(1,1)
e2:SetValue(CUNGUI.DrawCount)
Duel.RegisterEffect(e2,0)
end
function CUNGUI.DrawCount(e)
if Duel.GetTurnCount()==1 then return 0 end
local p=Duel.GetTurnPlayer()
local ct=Duel.GetFieldGroupCount(p,LOCATION_HAND,0)
if ct>4 then return 1
else return 5-ct end
end
\ No newline at end of file
--村规决斗:传世经典
--开局时,双方查看对方卡组,相互选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.ForbidCard(c)
local tp=c:GetControler()
local e1=Effect.GlobalEffect()
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e1:SetCode(EFFECT_FORBIDDEN)
e1:SetRange(LOCATION_SZONE)
e1:SetTargetRange(0x7f,0x7f)
e1:SetTarget(CUNGUI.bantg)
e1:SetLabel(c:GetCode())
Duel.RegisterEffect(e1,tp)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_TARGET)
e2:SetCode(EFFECT_ADD_TYPE)
e2:SetValue(TYPE_PENDULUM)
c:RegisterEffect(e2)
end
function CUNGUI.bantg(e,c)
local code1,code2=c:GetOriginalCodeRule()
local fcode=e:GetLabel()
return (code1==fcode or code2==fcode)
end
function CUNGUI.AdjustOperation(e)
local g=Group.CreateGroup()
for tp=0,1 do
if #Duel.GetFieldGroup(tp,0,LOCATION_DECK)>1 then
Duel.ConfirmCards(tp,Duel.GetFieldGroup(tp,0,LOCATION_DECK))
g:Merge(Duel.SelectMatchingCard(tp,nil,tp,0,LOCATION_DECK,2,2,nil))
end
end
g:ForEach(CUNGUI.ForbidCard)
Duel.SendtoExtraP(g,nil,REASON_RULE)
e:Reset()
end
\ No newline at end of file
--村规决斗:一拳超人
--开局时,双方从卡组外将1张【神拳粉碎】(97570038)表侧表示从游戏中除外。
--这张【神拳粉碎】得到以下效果。
--①这个效果每名玩家在决斗中只能使用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) 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,97570038)
Duel.Remove(c,POS_FACEUP,REASON_RULE)
CUNGUI.RuleCard[tp]=c
--forbid
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,EFFECT_COUNT_CODE_DUEL)
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 and not Duel.CheckPhaseActivity()
end
function CUNGUI.ruleop(e,tp,eg,ep,ev,re,r,rp)
local p=1-Duel.RockPaperScissors()
local g=Duel.GetFieldGroup(p,LOCATION_HAND+LOCATION_ONFIELD+LOCATION_GRAVE)
Duel.Remove(g,POS_FACEDOWN,REASON_RULE)
Duel.SkipPhase(tp,PHASE_MAIN1,RESET_PHASE+PHASE_END,1)
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0)
e1:SetCode(EFFECT_CANNOT_BP)
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
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.AdjustOperation(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetMatchingGroup(nil,0,0x7f,0x7f,nil)
g:ForEach(CUNGUI.RegisterMonsterSpecialEffects)
if not CUNGUI.Init then
CUNGUI.Init = true
Duel.Draw(1,1,REASON_RULE)
end
end
function CUNGUI.RegisterMonsterSpecialEffects(c)
if CUNGUI.RegisteredMonsters:IsContains(c) then return end
CUNGUI.RegisteredMonsters:AddCard(c)
--instant(chain)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(6733059,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetRange(LOCATION_GRAVE)
e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e2:SetCost(CUNGUI.cost)
e2:SetOperation(CUNGUI.operation)
c:RegisterEffect(e2)
end
function CUNGUI.cfilter(c)
return c:IsAbleToRemoveAsCost()
end
function CUNGUI.tfilter(c,lv)
return c:IsFaceup() and c:IsLevelBelow(lv)
end
function CUNGUI.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local cg=Duel.GetMatchingGroup(CUNGUI.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(CUNGUI.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,cg:GetCount())
return tg:GetCount()>0
end
e:SetLabel(0)
local cg=Duel.GetMatchingGroup(CUNGUI.cfilter,tp,LOCATION_GRAVE,0,nil)
local tg=Duel.GetMatchingGroup(CUNGUI.tfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,cg:GetCount())
local lvt={}
local tc=tg:GetFirst()
while tc do
local tlv=tc:GetLevel()
lvt[tlv]=tlv
tc=tg:GetNext()
end
local pc=1
for i=1,12 do
if lvt[i] then lvt[i]=nil lvt[pc]=i pc=pc+1 end
end
lvt[pc]=nil
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(6733059,2))
local lv=Duel.AnnounceNumber(tp,table.unpack(lvt))
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local rg=cg:Select(tp,lv,lv,nil)
Duel.Remove(rg,POS_FACEUP,REASON_COST)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,tg,1,0,0)
Duel.SetTargetParam(lv)
end
function CUNGUI.dfilter(c,lv)
return c:IsFaceup() and c:IsLevel(lv)
end
function CUNGUI.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local lv=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if lv==0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,CUNGUI.dfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,lv)
Duel.Destroy(g,REASON_EFFECT)
end
--村规决斗:盗版卫士
--所有卡都具有全字段。
--所有卡都视为全种类卡(怪兽+魔法+陷阱+仪式+同调……),也视为任何一张特定卡。
--细则:
--并不意味着有特定卡的效果,也不意味着场上受到了那张卡的影响。
--因此例如【场上有“海”才能发动】的效果,即使有卡也仍然是不能发动的。
--另外,在绝大多数情况下,如果在怪兽区域就仍然只能视为怪兽,
--在魔法陷阱区域就仍然只能视为魔法陷阱。
--所以类似【自己场上有连接怪兽2只以上存在的场合才能发动】的效果,
--只会检查前场有没有2只(不管是不是连接怪兽的)怪兽,
--类似旋风的效果也只能破坏后场的卡。
--在极少数情况下可能有部分效果脱离这个限制?目前没有发现。
CUNGUI = {}
Card.IsSetCard = function(c,setname) return true end
Card.IsType = function(c,typ) return true end
Card.IsCode = function(c,...) return true end
function Auxiliary.PreloadUds()
end
--村规决斗:巅峰出道
--所有其他诱发效果的触发时点都变为【有怪兽(包括自己)召唤·反转召唤·特殊召唤成功时】。
--如果原本就是这三个时点触发的效果,则没有变化。
--会直接导致一部分对触发时点有所依赖的效果无法发动或处理。
local OrigRegister = Card.RegisterEffect
CUNGUI = {}
CUNGUI.Registered={}
Card.RegisterEffect = function(c,e,b)
local typ = e:GetType()
if not CUNGUI.Registered[e] and (typ & (EFFECT_TYPE_TRIGGER_O + EFFECT_TYPE_TRIGGER_F))>0 and e:GetOperation()~=nil then
local code = e:GetCode()
if code and code~=EVENT_SUMMON_SUCCESS and code~=EVENT_SPSUMMON_SUCCESS and code~=EVENT_FLIP_SUMMON_SUCCESS then
CUNGUI.Registered[e]=true
e:SetCondition(aux.TRUE)
e:SetCode(EVENT_SUMMON_SUCCESS)
e:SetRange(LOCATION_ONFIELD)
local prop = e:GetProperty() or 0
prop = prop | EFFECT_FLAG_DELAY
e:SetProperty(prop)
if (typ | EFFECT_TYPE_SINGLE) > 0 then
typ = typ - EFFECT_TYPE_SINGLE
typ = typ | EFFECT_TYPE_FIELD
end
if (typ | EFFECT_TYPE_ACTIONS)>0 then
typ = typ - EFFECT_TYPE_ACTIONS
end
e:SetType(typ)
local xe=e:Clone()
xe:SetCode(EVENT_SPSUMMON_SUCCESS)
OrigRegister(c,xe)
local xe2=e:Clone()
xe2:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
OrigRegister(c,xe2)
local xe3=e:Clone()
typ=xe3:GetType()
if (typ & EFFECT_TYPE_FIELD)>0 then
if (typ | EFFECT_TYPE_ACTIONS)>0 then
typ = typ - EFFECT_TYPE_ACTIONS
end
typ = typ - EFFECT_TYPE_FIELD
typ = typ | EFFECT_TYPE_SINGLE
end
xe3:SetType(typ)
OrigRegister(c,xe3)
local xe4=xe2:Clone()
typ=xe4:GetType()
if (typ & EFFECT_TYPE_FIELD)>0 then
if (typ | EFFECT_TYPE_ACTIONS)>0 then
typ = typ - EFFECT_TYPE_ACTIONS
end
typ = typ - EFFECT_TYPE_FIELD
typ = typ | EFFECT_TYPE_SINGLE
end
xe4:SetType(typ)
OrigRegister(c,xe4)
local xe5=xe:Clone()
typ=xe5:GetType()
if (typ & EFFECT_TYPE_FIELD)>0 then
if (typ | EFFECT_TYPE_ACTIONS)>0 then
typ = typ - EFFECT_TYPE_ACTIONS
end
typ = typ - EFFECT_TYPE_FIELD
typ = typ | EFFECT_TYPE_SINGLE
end
xe5:SetType(typ)
OrigRegister(c,xe5)
end
end
return OrigRegister(c,e,b)
end
function Auxiliary.PreloadUds()
end
...@@ -83,7 +83,7 @@ standbyPhaseSkill(48356796, function(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,7 +83,7 @@ standbyPhaseSkill(48356796, function(e,tp,eg,ep,ev,re,r,rp)
Duel.Draw(tp,2,REASON_RULE) Duel.Draw(tp,2,REASON_RULE)
end) end)
phaseSkill(22959079, PHASE_STANDBY, function(e,tp,eg,ep,ev,re,r,rp) phaseSkill(22959079, PHASE_BATTLE_START, function(e,tp,eg,ep,ev,re,r,rp)
local a1,a2,a3=Duel.TossCoin(tp,3) local a1,a2,a3=Duel.TossCoin(tp,3)
local result=(a1+a2+a3)*2 local result=(a1+a2+a3)*2
local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD) local g=Duel.GetFieldGroup(tp,0,LOCATION_ONFIELD)
...@@ -96,7 +96,7 @@ phaseSkill(22959079, PHASE_STANDBY, function(e,tp,eg,ep,ev,re,r,rp) ...@@ -96,7 +96,7 @@ phaseSkill(22959079, PHASE_STANDBY, function(e,tp,eg,ep,ev,re,r,rp)
local rg2=g2:RandomSelect(tp,num) local rg2=g2:RandomSelect(tp,num)
Duel.Remove(rg,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg,POS_FACEUP,REASON_EFFECT)
Duel.Remove(rg2,POS_FACEUP,REASON_EFFECT) Duel.Remove(rg2,POS_FACEUP,REASON_EFFECT)
end) end,nil,true)
standbyPhaseSkill(2295831, function(e,tp,eg,ep,ev,re,r,rp) standbyPhaseSkill(2295831, function(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsAbleToHand,tp,LOCATION_DECK,0,1,1,nil)
......
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