Commit 03ea45bb authored by 未闻皂名's avatar 未闻皂名

2023/5/15 上级冲击的相关调整

parent ef363bd1
......@@ -43,8 +43,31 @@ function RushDuel.AttachDoubleTribute(e, card, value, desc, reset, forced)
return RushDuel.CreateSingleEffect(e, desc, card, EFFECT_DOUBLE_TRIBUTE, value, reset, forced)
end
-- 赋予: 使用对方的怪兽解放
function RushDuel.AttachOpponentTribute(e, card, desc, reset, forced)
return RushDuel.CreateSingleEffect(e, desc, card, EFFECT_EXTRA_RELEASE_SUM, nil, reset, forced)
function RushDuel.AttachOpponentTribute(e, card, flag, desc, reset, reset_player)
local tp = e:GetHandlerPlayer()
if Duel.IsPlayerAffectedByEffect(tp, EFFECT_CANNOT_SINGLE_TRIBUTE) and Duel.IsPlayerAffectedByEffect(tp, EFFECT_CANNOT_DOUBLE_TRIBUTE) then
return nil
else
card:RegisterFlagEffect(flag, reset, EFFECT_FLAG_CLIENT_HINT, 1, 0, desc)
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_ADD_EXTRA_TRIBUTE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetTargetRange(0, LOCATION_MZONE)
e1:SetLabelObject(card)
e1:SetTarget(function(e, c)
return c == e:GetLabelObject() and card:GetFlagEffect(flag) ~= 0
end)
e1:SetValue(POS_FACEUP_ATTACK + POS_FACEDOWN_DEFENSE)
local e2 = Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_GRANT)
e2:SetTarget(aux.TargetBoolFunction(Card.IsType, TYPE_MONSTER))
e2:SetTargetRange(LOCATION_HAND, 0)
e2:SetLabelObject(e1)
e2:SetReset(reset_player or reset)
Duel.RegisterEffect(e2, e:GetHandlerPlayer())
return e1, e2
end
end
-- 赋予: 效果战斗抗性
function RushDuel.AttachBattleIndes(e, card, value, desc, reset, forced)
......@@ -78,7 +101,7 @@ function RushDuel.AttachAttackAnnounce(e, card, operation, desc, reset, forced)
end
-- 赋予: 回合结束时特效
function RushDuel.AttachEndPhase(e, card, player, code, operation, desc)
card:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD, EFFECT_FLAG_CLIENT_HINT, 1, code, desc)
card:RegisterFlagEffect(0, RESET_EVENT + RESETS_STANDARD + RESET_PHASE + PHASE_END, EFFECT_FLAG_CLIENT_HINT, 1, code, desc)
local e1 = Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE + PHASE_END)
......
......@@ -13,6 +13,7 @@ RACE_ALL = 0x7fffffff
-- 特殊调整
EFFECT_LEGEND_CARD = 120000000 -- 传说卡标识 (改变卡名不影响)
EFFECT_CANNOT_SINGLE_TRIBUTE = 120170045 -- 监狱岛 大姐头巨岩 (与下面的效果结合变成不能上级召唤)
EFFECT_CANNOT_DOUBLE_TRIBUTE = 120120029 -- 魔将 雅灭鲁拉 (不能使用:双重解放)
EFFECT_PLAYER_CANNOT_ATTACK = 120155054 -- 幻刃封锁 (对方不能攻击时不能发动)
EFFECT_PLAYER_RACE_CANNOT_ATTACK = 120155055 -- 幻刃封锁 (不能选择不能攻击的种族)
......
......@@ -117,8 +117,8 @@ function RushDuel.IsCanAttachDoubleTribute(card, value)
return RushDuel.CheckValueDoubleTribute(values, value)
end
-- 条件: 可否赋予效果 - 使用对方的怪兽解放
function RushDuel.IsCanAttachOpponentTribute(card)
return not card:IsHasEffect(EFFECT_EXTRA_RELEASE_SUM) and not card:IsHasEffect(EFFECT_CANNOT_ATTACK)
function RushDuel.IsCanAttachOpponentTribute(card, flag)
return card:GetFlagEffect(flag) == 0
end
-- 条件: 可否赋予效果 - 战斗破坏抗性
function RushDuel.IsCanAttachBattleIndes(card, value)
......
......@@ -19,6 +19,14 @@ function cm.initial_effect(c)
local e3=e2:Clone()
e3:SetCode(EFFECT_CANNOT_MSET)
c:RegisterEffect(e3)
--Limit Tribute
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD)
e4:SetCode(EFFECT_CANNOT_SINGLE_TRIBUTE)
e4:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e4:SetRange(LOCATION_FZONE)
e4:SetTargetRange(1,1)
c:RegisterEffect(e4)
end
function cm.sumlimit(e,c,sump,sumtype,sumpos,targetp,se)
......
......@@ -17,7 +17,7 @@ function cm.filter1(c)
return c:IsLevelAbove(1) and c:IsAbleToGrave()
end
function cm.filter2(c,g)
return c:IsFaceup() and c:IsLevelAbove(1) and RD.IsCanAttachOpponentTribute(c)
return c:IsFaceup() and c:IsLevelAbove(1) and RD.IsCanAttachOpponentTribute(c,20244046)
and g:CheckWithSumEqual(Card.GetLevel,c:GetLevel(),1,g:GetCount())
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
......@@ -36,7 +36,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local mg=g:SelectWithSumEqual(tp,Card.GetLevel,tc:GetLevel(),1,g:GetCount())
if Duel.SendtoGrave(mg,REASON_EFFECT)~=0 then
RushDuel.AttachOpponentTribute(e,tc,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RushDuel.AttachOpponentTribute(e,tc,20244046,aux.Stringid(m,1),RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,RESET_PHASE+PHASE_END)
end
end)
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