Commit 75159769 authored by JoyJ's avatar JoyJ

update srv5555

parent 07eea4d5
dc-php @ f0577fab
Subproject commit f0577fab8da59b23f8b3e3e495c292b0995ed3e4
--村规决斗:霜之哀伤
--一名玩家的基本分达到16000的场合,那个玩家的对方基本分变为0。
--所有怪兽得到以下效果:
--这张卡召唤·特殊召唤成功的场合,
--从卡组外将1张【蓝色药剂】(20871001)加入对方墓地。
--这个效果置于墓地的【蓝色药剂】增加效果:
--此类效果1回合只能使用1次。
--这张卡在墓地的场合,自己结束阶段发动。回复自己墓地【蓝色药剂】数量*400。
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)
--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.AdjustOperation2)
Duel.RegisterEffect(e1,0)
end
function CUNGUI.AdjustOperation2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLP(0)>=16000 then
Duel.SetLP(1,0)
elseif Duel.GetLP(1)>=16000 then
Duel.SetLP(0,0)
end
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)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1)
e2:SetOperation(CUNGUI.thop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e3)
end
function CUNGUI.thop(e,tp,eg,ep,ev,re,r,rp)
local token=Duel.CreateToken(1-tp,20871001)
Duel.SendtoGrave(token,REASON_RULE)
local e1=Effect.CreateEffect(token)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_END)
e1:SetRange(LOCATION_GRAVE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCountLimit(1,20871001)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetCondition(CUNGUI.reccon)
e1:SetTarget(CUNGUI.rectg)
e1:SetOperation(CUNGUI.recop)
token:RegisterEffect(e1)
end
function CUNGUI.reccon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp
end
function CUNGUI.recfilter(c)
return c:IsFaceup() and c:IsCode(76103675)
end
function CUNGUI.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local rec=400*Duel.GetMatchingGroupCount(CUNGUI.recfilter,tp,LOCATION_GRAVE,0,nil)
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(rec)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,rec)
end
function CUNGUI.recop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
d=400*Duel.GetMatchingGroupCount(CUNGUI.recfilter,tp,LOCATION_GRAVE,0,nil)
Duel.Recover(p,d,REASON_EFFECT)
end
--村规决斗:禁忌法则
--所有卡得到以下效果:
--这个效果的发动和效果不会被无效化。
--把这张卡从手卡里侧表示除外才能发动。从卡组外将1张随机禁卡加入手卡或额外卡组。
--这个效果加入手卡的卡,在那个回合不能把此类效果发动(即使发生过位置移动)。
--细则:
--采用2022年1月禁卡表。
--加入的卡不需要给对方确认。
CUNGUI = {}
CUNGUI.forbidden={91869203,20663556,44910027,51858306,25862681,53804307,7563579,17330916,34945480,
90411554,8903700,11384280,17412721,67441435,34124316,88071625,61665245,52653092,48905153,85115440,
59537380,86148577,88581108,21377582,94677445,16923472,15341821,37818794,18326736,79875176,75732622,
22593417,39064822,3679218,54719828,58820923,26400609,71525232,78706415,93369354,23558733,9929398,
9047460,31178212,63101919,34206604,4423206,14702066,96782886,3078576,34086406,85243784,57421866,
41482598,44763025,17375316,19613556,74191942,42829885,45986603,55144522,4031928,23557835,31423101,
57953380,54447022,60682203,69243953,79571449,70828912,42703248,52947044,76375976,34906152,46448938,
46411259,85602018,27174286,93016201,3280747,64697231,80604091,35316708,32723153,17178486,28566710}
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)
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 add=0
while add==0 do
local code=math.random(#CUNGUI.forbidden)
local tc=Duel.CreateToken(tp,code)
if tc then
add = Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
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