Commit eb048763 authored by 未闻皂名's avatar 未闻皂名

2024/12/22 新增:异画元素英雄 闪光火焰翼侠,返回手卡·卡组的判断调整

parent 0aac38e5
Pipeline #31954 passed with stages
in 7 minutes and 56 seconds
No preview for this file type
......@@ -237,7 +237,7 @@ end
-- 操作: 加入/返回手卡, 并给对方确认
function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, expect)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand,nil)
if Duel.SendtoHand(g, nil, REASON_EFFECT) == 0 then
return false
end
......@@ -248,7 +248,7 @@ function RushDuel.SendToHandAndExists(target, confirm_player, filter, count, exp
end
-- 操作: 返回对方手卡, 不能确认那些卡
function RushDuel.SendToOpponentHand(target)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToHand,nil)
return Duel.SendtoHand(g, nil, REASON_EFFECT)
end
......@@ -297,12 +297,12 @@ end
-- 操作: 返回卡组
function RushDuel.SendToDeckAndExists(target, filter, count, expect)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT) ~= 0 and RushDuel.IsOperatedGroupExists(filter, count, expect)
end
-- 操作: 返回卡组上面 (排序)
function RushDuel.SendToDeckTop(target, sort_player)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
if sort_player ~= nil then
local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKTOP, REASON_EFFECT, sort_player)
return ct
......@@ -312,7 +312,7 @@ function RushDuel.SendToDeckTop(target, sort_player)
end
-- 操作: 返回卡组下面 (排序)
function RushDuel.SendToDeckBottom(target, sort_player)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
if sort_player ~= nil then
local og, ct = RushDuel.SendToDeckSort(g, SEQ_DECKBOTTOM, REASON_EFFECT, sort_player)
return ct
......@@ -322,14 +322,19 @@ function RushDuel.SendToDeckBottom(target, sort_player)
end
-- 操作: 返回卡组上面或下面 (排序)
function RushDuel.SendToDeckTopOrBottom(target, sort_player, top_desc, bottom_desc)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
local sequence = Duel.SelectOption(sort_player, top_desc, bottom_desc)
local og, ct = RushDuel.SendToDeckSort(g, sequence, REASON_EFFECT, sort_player)
return ct
end
-- 操作: 返回对方卡组上面 (排序)
function RushDuel.SendToOpponentDeck(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
return Duel.SendtoDeck(g, nil, SEQ_DECKSHUFFLE, REASON_EFFECT)
end
-- 操作: 返回对方卡组上面 (排序)
function RushDuel.SendToOpponentDeckTop(target, player)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
if g:GetCount() == 1 then
return Duel.SendtoDeck(g, nil, SEQ_DECKTOP, REASON_EFFECT)
else
......@@ -339,7 +344,7 @@ function RushDuel.SendToOpponentDeckTop(target, player)
end
-- 操作: 返回对方卡组下面 (排序)
function RushDuel.SendToOpponentDeckBottom(target, player)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
if g:GetCount() == 1 then
return Duel.SendtoDeck(g, nil, SEQ_DECKBOTTOM, REASON_EFFECT)
else
......
......@@ -108,7 +108,7 @@ end
-- 返回卡组并排序
function RushDuel.SendToDeckSort(target, sequence, reason, sort_player)
local g = RushDuel.ToMaximunGroup(target)
local g = RushDuel.ToMaximunGroup(target):Filter(Card.IsAbleToDeck,nil)
local ct = 0
if sequence == SEQ_DECKTOP then
ct = Auxiliary.PlaceCardsOnDeckTop(sort_player, g, reason)
......
......@@ -25,7 +25,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local sg=g:RandomSelect(tp,1)
if sg:GetCount()>0 then
Duel.BreakEffect()
Duel.SendtoDeck(sg,nil,SEQ_DECKBOTTOM,REASON_EFFECT)
RD.SendToOpponentDeckBottom(sg,tp)
end
end
end
\ No newline at end of file
......@@ -39,7 +39,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.BreakEffect()
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
RD.SendToOpponentDeck(sg)
end
end
--Event
......
......@@ -27,7 +27,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
and tc:IsControler(1-tp) and tc:IsLevelBelow(8)
and tc:IsControler(1-tp) and tc:IsLevelBelow(8) and tc:IsAbleToHand()
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return true end
......
......@@ -25,7 +25,6 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_RTOHAND,Card.IsAbleToHand,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil,function(g)
local sg=RD.ToMaximunGroup(g)
Duel.SendtoHand(sg,nil,REASON_EFFECT)
RD.SendToOpponentHand(g)
end)
end
\ No newline at end of file
......@@ -35,7 +35,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetMatchingGroupCount(Card.IsFaceup,tp,0,LOCATION_MZONE,nil)
if ct==0 then return end
RD.SelectAndDoAction(HINTMSG_RTOHAND,aux.NecroValleyFilter(cm.filter),tp,0,LOCATION_GRAVE,1,ct,nil,function(g)
if Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 then
if RD.SendToOpponentHand(g)~=0 then
local c=e:GetHandler()
local atk=Duel.GetFieldGroupCount(tp,LOCATION_HAND,LOCATION_HAND)*100
if atk~=0 and c:IsFaceup() and c:IsRelateToEffect(e) then
......
......@@ -28,6 +28,6 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
local sg=g:RandomSelect(tp,1)
Duel.SendtoDeck(sg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
RD.SendToOpponentDeck(sg)
end
end
\ No newline at end of file
......@@ -17,18 +17,22 @@ function cm.confilter(c)
return c:IsFaceup() and not RD.IsMaximumMode(c)
and c:GetBaseAttack()==0 and c:GetBaseDefense()==0 and c:IsRace(RACE_FAIRY)
end
function cm.getgroup()
local g=Duel.GetMatchingGroup(Card.IsFaceup,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg=g:GetMaxGroup(Card.GetBaseAttack):Filter(Card.IsAbleToHand,nil)
return mg
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil) and ep==tp and r==REASON_RULE
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
local g=cm.getgroup()
if chk==0 then return g:GetCount()>0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
local mg=g:GetMaxGroup(Card.GetBaseAttack)
if mg:GetCount()>0 then
RD.SendToOpponentHand(mg)
local g=cm.getgroup()
if g:GetCount()>0 then
RD.SendToOpponentHand(g)
end
end
\ No newline at end of file
......@@ -36,7 +36,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
RD.SelectAndDoAction(HINTMSG_TODECK,aux.NecroValleyFilter(Card.IsAbleToDeck),tp,0,LOCATION_GRAVE,1,3,nil,function(g)
local ct=Duel.SendtoDeck(g,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
local ct=RD.SendToOpponentDeck(g)
local c=e:GetHandler()
if e:GetLabel()>=8 and c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,ct*300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
......
......@@ -13,16 +13,18 @@ function cm.initial_effect(c)
end
--Activate
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=Duel.GetAttackTarget()
return Duel.GetAttacker():IsControler(1-tp)
and c and c:IsControler(tp) and c:IsPosition(POS_FACEUP_ATTACK)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if a:IsControler(1-tp) and b and b:IsControler(tp) and b:IsPosition(POS_FACEUP_ATTACK) then
return a:IsAbleToHand() or b:IsAbleToHand()
end
return false
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local a=Duel.GetAttacker()
local b=Duel.GetAttackTarget()
if a and b and a:IsRelateToBattle() and b:IsRelateToBattle() then
local g=Group.FromCards(a,b)
Duel.HintSelection(g)
local g=Group.FromCards(a,b):Filter(Card.IsAbleToHand,nil)
RD.SendToOpponentHand(g)
end
end
\ No newline at end of file
......@@ -23,5 +23,5 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.filter,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,aux.ExceptThisCard(e))
Duel.SendtoHand(sg,nil,REASON_EFFECT)
RD.SendToOpponentHand(sg)
end
\ No newline at end of file
local m=120278001
local list={120263001,120263005}
local cm=_G["c"..m]
cm.name="元素英雄 闪光火焰翼侠"
function cm.initial_effect(c)
RD.AddCodeList(c,list)
--Fusion Material
RD.AddFusionProcedure(c,list[1],list[2])
--Only Fusion Summon
RD.OnlyFusionSummon(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkval)
c:RegisterEffect(e1)
--Damage
local e2=RD.ContinuousBattleDestroyingDamage(c)
--Continuous Effect
RD.AddContinuousEffect(c,e1,e2)
end
--Atk Up
function cm.filter(c)
return c:IsRace(RACE_WARRIOR)
end
function cm.atkval(e,c)
return Duel.GetMatchingGroupCount(cm.filter,c:GetControler(),LOCATION_GRAVE,0,nil)*300
end
--Damage
function cm.damcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local bc=c:GetBattleTarget()
return c:IsRelateToBattle() and bc:IsLocation(LOCATION_GRAVE) and bc:IsType(TYPE_MONSTER)
end
function cm.damop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetHandler():GetBattleTarget()
if tc then
local dam=RD.GetBaseAttackOnDestroy(tc)
Duel.Hint(HINT_CARD,0,m)
Duel.Damage(1-tp,dam,REASON_EFFECT)
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