Commit 96f38d2e authored by IamIpanda's avatar IamIpanda

Fix; new card

parent 5e6ed117
Pipeline #38944 passed with stages
in 1 minute and 29 seconds
......@@ -31,7 +31,7 @@ S.A.R.A.(172016020) 无 3星 龙/调整 0 1800 (Custom)
# 可以对连接怪兽发动,处理完成因效果适用未完成,返回手卡不执行。
那个什么来着(172016021) 通常陷阱 (Custom)
这张卡能且只能从手卡发动。
①:自己场上没有怪兽存在,对方场上这回合特殊召唤且攻击表示的怪兽把效果发动时才能发动。从卡组选1张「健忘」除外,那张卡的效果适用。那之后,这张卡返回手卡。
①:对方场上这回合特殊召唤且攻击表示的怪兽把效果发动时才能发动。从卡组选1张「健忘」除外,那张卡的效果适用。那之后,这张卡返回手卡。
②:这张卡送去墓地时才能发动。自己除外的「健忘」尽可能在场上盖放。这个效果盖放的卡从场上离开时返回卡组。
纵欲之壶(172016022) 通常魔法 (Custom)
......
......@@ -83,6 +83,13 @@
强制捕获装置(172016042) 通常陷阱 (Custom)
①:丢弃1张手卡,以对方场上1只怪兽为对象才能发动。那只怪兽加入自己手卡。
心灵崩灭(172016043) 通常陷阱 (Custom)
这张卡可以支付一半基本分从手卡发动。
①:宣言不超过自己手卡数量的卡名。从手卡发动的场合,至少宣言3个。
●宣言卡名的卡全部在对方手中的场合:那些卡丢弃。宣言数量的卡在4张以上的场合,这张卡结算结束后不送去墓地在自己场上盖放。
●有不存在的卡名的场合:对方确认自己的手牌,选不在对方手中的宣言卡名数量的卡丢弃。
提示文本:是否要继续宣言卡名?
看到这张卡在卡池里应该反省的是你不是我(172016099) 通常魔法 (Custom)
决斗开始时,从以下效果中选择两项并公示。这场决斗中,这个卡名的卡具有选择的效果。那之后,可以随机选自己1张手卡返回卡组,卡组中1张这个卡名的卡加入手卡。
①:原本控制者是对方的卡的包含对自己效果伤害的效果发动时,可以把手卡的这张卡丢弃。那次伤害变成对方受到这个效果10倍的伤害。这个效果每适用过1次,游戏每进行过1回合,这个倍数下降3(最多下降至0)。
......
......@@ -55,13 +55,13 @@ function s.disop(e,tp,eg,ep,ev,re,r,rp)
local tg=Group.CreateGroup()
for rc in aux.Next(rg) do
local tc=Duel.CreateToken(rc:GetControler(),tid)
getmetatable(tc).register(tc,rc)
s.register(tc,rc)
tg:AddCard(tc)
end
Duel.SendtoHand(tg,nil,REASON_EFFECT,tp)
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT,tp)
for rc in aux.Next(tg) do
getmetatable(rc).register2(rc)
s.register2(rc)
end
--cannot activitate spell/trap
local e3=Effect.CreateEffect(e:GetHandler())
......@@ -81,3 +81,85 @@ function s.aclimit(e,re,tp)
local c=re:GetHandler()
return c:IsLocation(LOCATION_GRAVE) and c:IsType(TYPE_SPELL+TYPE_TRAP)
end
function s.register(c,rc)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_SET_AVAILABLE+EFFECT_FLAG_IGNORE_RANGE+EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetRange(~LOCATION_REMOVED)
e1:SetValue(rc:GetOriginalCodeRule())
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_CHANGE_ATTRIBUTE)
e2:SetValue(rc:GetAttribute())
c:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_CHANGE_RACE)
e3:SetValue(rc:GetRace())
c:RegisterEffect(e3)
local e4=e1:Clone()
e4:SetCode(EFFECT_SET_BASE_ATTACK_FINAL)
e4:SetValue(rc:GetBaseAttack())
c:RegisterEffect(e4)
local e4p=e4:Clone()
e4p:SetCode(EFFECT_SET_ATTACK_FINAL)
c:RegisterEffect(e4p)
local e5=e1:Clone()
e5:SetCode(EFFECT_SET_BASE_DEFENSE_FINAL)
e5:SetValue(rc:GetBaseDefense())
c:RegisterEffect(e5)
local e5p=e5:Clone()
e5p:SetCode(EFFECT_SET_DEFENSE_FINAL)
c:RegisterEffect(e5p)
local e6=e1:Clone()
e6:SetCode(EFFECT_CHANGE_LEVEL)
e6:SetValue(rc:GetLevel())
c:RegisterEffect(e6)
if rc:IsType(TYPE_XYZ) then
local e6p=e1:Clone()
e6p:SetCode(EFFECT_CHANGE_RANK)
e6p:SetValue(rc:GetRank())
end
-- ocg don't have effects change link number.
-- if rc:IsType(TYPE_LINK) then
-- local e6p=e1:Clone()
-- e6p:SetCode(EFFECT_CHANGE_LINK)
-- e6p:SetValue(rc:GetLink())
-- c:RegisterEffect(e6p)
-- end
local e7=e1:Clone()
e7:SetCode(EFFECT_CANNOT_SUMMON)
c:RegisterEffect(e7)
local e8=e1:Clone()
e8:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
c:RegisterEffect(e8)
local e9=e1:Clone()
e9:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e9)
c:RegisterFlagEffect(id,RESET_EVENT+RESET_REMOVE,0,1,rc:GetOriginalCodeRule())
end
function s.register2(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_TO_HAND)
e1:SetOperation(s.op)
c:RegisterEffect(e1)
end
function s.op(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tid=c:GetFlagEffectLabel(id)
Duel.Remove(c,POS_FACEDOWN,REASON_RULE)
local g=Duel.GetMatchingGroup(s.refilter,tp,LOCATION_REMOVED,0,nil,tid)
if #g==1 then
Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_RULE)
elseif #g>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_RULE)
end
end
function s.refilter(c,tid)
return not c:IsFaceup() and c:IsOriginalCodeRule(tid)
end
--心灵崩灭
local s,id=GetID()
function s.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_TOHAND)
e1:SetCategory(CATEGORY_HANDES)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
--act in hand
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCost(s.handcost)
c:RegisterEffect(e2)
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)>0
and Duel.IsExistingMatchingCard(nil,tp,LOCATION_HAND,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_ANNOUNCE,nil,0,tp,0)
end
function s.handcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckLPCost(tp,math.floor(Duel.GetLP(tp)/2)) end
Duel.PayLPCost(tp,math.floor(Duel.GetLP(tp)/2))
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local max=Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
local min=1
if c:IsStatus(STATUS_ACT_FROM_HAND) then
min=3
end
local announced={}
local filter={TYPE_FUSION+TYPE_SYNCHRO+TYPE_XYZ+TYPE_LINK,OPCODE_ISTYPE,OPCODE_NOT}
while #announced<max do
local sid=Duel.AnnounceCard(tp,table.unpack(filter))
table.insert(announced,sid)
table.insert(filter,sid)
table.insert(filter,OPCODE_ISCODE)
table.insert(filter,OPCODE_NOT)
table.insert(filter,OPCODE_AND)
if #announced>=min and not Duel.SelectYesNo(tp,aux.Stringid(id,0)) then
break
end
end
local g=Group.CreateGroup()
local miss=0
for _,ac in ipairs(announced) do
local sg=Duel.GetMatchingGroup(Card.IsCode,tp,0,LOCATION_HAND,nil,ac)
if #sg==0 then
miss=miss+1
else
g:Merge(sg)
end
end
if miss>0 then
local tg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
Duel.ConfirmCards(1-tp,tg)
Duel.Hint(HINT_SELECTMSG,1-tp,HINTMSG_DISCARD)
local sg=tg:Select(1-tp,miss,miss,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
else
Duel.SendtoGrave(g,REASON_EFFECT+REASON_DISCARD)
if #g>=4 then
Duel.BreakEffect()
c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end
end
end
......@@ -54,6 +54,7 @@ function s.initial_effect(c)
end
function s.reflectcon(e,tp,eg,ep,ev,re,r,rp)
if s.enabled[tp]&1==0 then return false end
if rp~=1-tp then return false end
if re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE) then return false end
local ex,cg,ct,cp,cv=Duel.GetOperationInfo(ev,CATEGORY_DAMAGE)
if ex and (cp==tp or cp==PLAYER_ALL) then return true end
......@@ -91,7 +92,11 @@ end
function s.damval(e,re,val,r,rp,rc)
local cid=Duel.GetChainInfo(0,CHAININFO_CHAIN_ID)
if cid~=e:GetLabel() then return val end
local v=val*math.max(0,13-Duel.GetTurnCount()*3)
local ctc=Duel.GetFlagEffectLabel(e:GetOwnerPlayer(),id)
if ctc==nil then ctc=0 end
local v=val*math.max(0,13-Duel.GetTurnCount()*3-ctc*3)
if ctc==nil then Duel.RegisterFlagEffect(e:GetOwnerPlayer(),id,0,0,1)
else Duel.SetFlagEffectLabel(e:GetOwnerPlayer(),id,ctc+1) end
return v
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