Commit 576ed775 authored by 未闻皂名's avatar 未闻皂名

2024/4/5 调整3只解放的判断、表示形式的Cost,修复bug

parent 144cfe2d
Pipeline #26246 passed with stages
in 7 minutes and 25 seconds
No preview for this file type
...@@ -303,15 +303,15 @@ function RushDuel.CostSendSelfToHand() ...@@ -303,15 +303,15 @@ function RushDuel.CostSendSelfToHand()
Duel.SendtoHand(RushDuel.ToMaximunGroup(e:GetHandler()), nil, REASON_COST) Duel.SendtoHand(RushDuel.ToMaximunGroup(e:GetHandler()), nil, REASON_COST)
end end
end end
-- 代价: 改变表示形式 -- 代价: 改变自身的表示形式
function RushDuel.CostChangePosition(pos) function RushDuel.CostChangeSelfPosition(pos1, pos2)
return function(e, tp, eg, ep, ev, re, r, rp, chk) return function(e, tp, eg, ep, ev, re, r, rp, chk)
local c = e:GetHandler() local c = e:GetHandler()
if chk == 0 then if chk == 0 then
return (not pos or not c:IsPosition(pos)) and RushDuel.IsCanChangePosition(c) return (not pos1 or c:IsPosition(pos1)) and RushDuel.IsCanChangePosition(c)
end end
if pos then if pos2 then
RD.ChangePosition(c, pos) RD.ChangePosition(c, pos2)
else else
RD.ChangePosition(c) RD.ChangePosition(c)
end end
...@@ -372,8 +372,8 @@ function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, cou ...@@ -372,8 +372,8 @@ function RushDuel.CostChooseAction(hit1, hit2, hit3, filter1, check1, zone1, cou
min, max = max, min min, max = max, min
end end
sg = g1:SelectSubGroup(tp, function(g) sg = g1:SelectSubGroup(tp, function(g)
return (RushDuel.GroupAllCount(g, Card.IsLocation, count1, zone1) and (not check1 or check1(sg))) or return (RushDuel.GroupAllCount(g, Card.IsLocation, count1, zone1) and (not check1 or check1(g))) or
(RushDuel.GroupAllCount(g, Card.IsLocation, count2, zone2) and (not check2 or check2(sg))) (RushDuel.GroupAllCount(g, Card.IsLocation, count2, zone2) and (not check2 or check2(g)))
end, false, min, max) end, false, min, max)
if sg:GetCount() == count1 and (not check1 or check1(sg)) then if sg:GetCount() == count1 and (not check1 or check1(sg)) then
action1(sg, e, tp, eg, ep, ev, re, r, rp) action1(sg, e, tp, eg, ep, ev, re, r, rp)
......
...@@ -26,7 +26,7 @@ function RushDuel.AddSummonProcedureZero(card, desc, condition, operation) ...@@ -26,7 +26,7 @@ function RushDuel.AddSummonProcedureZero(card, desc, condition, operation)
if operation ~= nil then if operation ~= nil then
e1:SetOperation(operation) e1:SetOperation(operation)
end end
e1:SetValue(SUMMON_VALUE_ZERO) e1:SetValue(SUMMON_VALUE_ZERO + SUMMON_VALUE_SELF)
card:RegisterEffect(e1) card:RegisterEffect(e1)
return e1 return e1
end end
...@@ -49,7 +49,7 @@ function RushDuel.AddSummonProcedureOne(card, desc, condition, filter, operation ...@@ -49,7 +49,7 @@ function RushDuel.AddSummonProcedureOne(card, desc, condition, filter, operation
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(RushDuel.SummonProcedureConditionOne(filter, condition)) e1:SetCondition(RushDuel.SummonProcedureConditionOne(filter, condition))
e1:SetOperation(RushDuel.SummonProcedureOperationOne(filter, operation)) e1:SetOperation(RushDuel.SummonProcedureOperationOne(filter, operation))
e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_ONE) e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_ONE + SUMMON_VALUE_SELF)
card:RegisterEffect(e1) card:RegisterEffect(e1)
return e1 return e1
end end
...@@ -84,7 +84,7 @@ function RushDuel.AddSummonProcedureTwo(card, desc, condition, filter, operation ...@@ -84,7 +84,7 @@ function RushDuel.AddSummonProcedureTwo(card, desc, condition, filter, operation
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(RushDuel.SummonProcedureConditionTwo(filter, condition)) e1:SetCondition(RushDuel.SummonProcedureConditionTwo(filter, condition))
e1:SetOperation(RushDuel.SummonProcedureOperationTwo(filter, operation)) e1:SetOperation(RushDuel.SummonProcedureOperationTwo(filter, operation))
e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_TWO) e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_TWO + SUMMON_VALUE_SELF)
card:RegisterEffect(e1) card:RegisterEffect(e1)
return e1 return e1
end end
...@@ -119,7 +119,7 @@ function RushDuel.AddSummonProcedureThree(card, desc, condition, filter, operati ...@@ -119,7 +119,7 @@ function RushDuel.AddSummonProcedureThree(card, desc, condition, filter, operati
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE + EFFECT_FLAG_UNCOPYABLE)
e1:SetCondition(RushDuel.SummonProcedureConditionThree(filter, condition)) e1:SetCondition(RushDuel.SummonProcedureConditionThree(filter, condition))
e1:SetOperation(RushDuel.SummonProcedureOperationThree(filter, operation)) e1:SetOperation(RushDuel.SummonProcedureOperationThree(filter, operation))
e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_THREE) e1:SetValue(SUMMON_TYPE_ADVANCE + SUMMON_VALUE_THREE + SUMMON_VALUE_SELF)
card:RegisterEffect(e1) card:RegisterEffect(e1)
local mt = getmetatable(card) local mt = getmetatable(card)
if mt.is_can_triple_tribute == nil then if mt.is_can_triple_tribute == nil then
......
...@@ -25,7 +25,7 @@ function cm.desfilter(c) ...@@ -25,7 +25,7 @@ function cm.desfilter(c)
end end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_THREE) return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_SELF)
end end
cm.cost=RD.CostSendGraveToDeck(cm.costfilter,5,5) cm.cost=RD.CostSendGraveToDeck(cm.costfilter,5,5)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
local m=120109039
local cm=_G["c"..m]
cm.name="魔导师之力"
function cm.initial_effect(c)
--Activate
RD.RegisterEquipEffect(c,nil,nil,cm.target)
--Atk & Def Up
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_EQUIP)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(cm.upval)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EFFECT_UPDATE_DEFENSE)
c:RegisterEffect(e2)
end
--Activate
function cm.target(c,e,tp)
return c:IsFaceup()
end
--Atk & Def Up
function cm.upval(e,c)
local ct=Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,nil,TYPE_SPELL+TYPE_TRAP)
return ct*500
end
\ No newline at end of file
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler()) return RD.IsSummonTurn(e:GetHandler())
end end
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
function cm.filter(c) function cm.filter(c)
return c:IsAttackPos() and RD.IsCanChangePosition(c) return c:IsAttackPos() and RD.IsCanChangePosition(c)
end end
cm.cost=RD.CostChangePosition(POS_FACEUP_DEFENSE) cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil) local g=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
......
...@@ -18,7 +18,7 @@ cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP) ...@@ -18,7 +18,7 @@ cm.indval=RD.ValueEffectIndesType(0,TYPE_TRAP)
function cm.filter(c) function cm.filter(c)
return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsDefenseAbove(c,2000) return c:IsFaceup() and c:IsType(TYPE_NORMAL) and RD.IsDefenseAbove(c,2000)
end end
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_MZONE,0,1,nil) end
end end
......
...@@ -17,7 +17,7 @@ end ...@@ -17,7 +17,7 @@ end
function cm.spfilter(c,e,tp) function cm.spfilter(c,e,tp)
return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP) return c:IsLevelBelow(4) and c:IsRace(RACE_INSECT) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end end
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetMZoneCount(tp)>1 if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,59822133) and Duel.GetMZoneCount(tp)>1
and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,2,nil,e,tp) end and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_HAND,0,2,nil,e,tp) end
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsType(TYPE_SPELL) return c:IsType(TYPE_SPELL)
end end
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local dam=Duel.GetMatchingGroupCount(cm.filter,tp,0,LOCATION_GRAVE,nil)*100 local dam=Duel.GetMatchingGroupCount(cm.filter,tp,0,LOCATION_GRAVE,nil)*100
if chk==0 then return dam>0 end if chk==0 then return dam>0 end
......
local m=120218009
local cm=_G["c"..m]
cm.name="精英秘密搜查官 神秘小姐"
function cm.initial_effect(c)
--Atk Up
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_SPECIAL_SUMMON+CATEGORY_GRAVE_SPSUMMON)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCost(cm.cost)
e1:SetOperation(cm.operation)
c:RegisterEffect(e1)
end
--Atk Up
function cm.costfilter(c)
if c:IsLocation(LOCATION_HAND) then
return c:IsAbleToDeckAsCost()
else
return c:IsFaceup() and c:IsRace(RACE_REPTILE) and c:IsAbleToDeckOrExtraAsCost()
end
end
function cm.costcheck(g)
return g:FilterCount(Card.IsLocation,nil,LOCATION_HAND)==1
end
function cm.spfilter(c,e,tp)
return c:IsLevelAbove(7) and c:IsRace(RACE_REPTILE) and RD.IsCanBeSpecialSummoned(c,e,tp,POS_FACEUP)
end
cm.cost=RD.CostSendGroupToDeckSort(cm.costfilter,cm.costcheck,LOCATION_HAND+LOCATION_MZONE,3,3,true,SEQ_DECKSHUFFLE,true,false)
function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then
RD.AttachAtkDef(e,c,300,0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
RD.CanSelectAndSpecialSummon(aux.Stringid(m,1),aux.NecroValleyFilter(cm.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,2,nil,e,POS_FACEUP,true)
end
end
\ No newline at end of file
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function cm.exfilter(c) function cm.exfilter(c)
return c:IsPosition(POS_FACEUP_DEFENSE) return c:IsPosition(POS_FACEUP_DEFENSE)
end end
cm.cost=RD.CostChangePosition(POS_FACEUP_DEFENSE) cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
end end
......
...@@ -21,7 +21,7 @@ end ...@@ -21,7 +21,7 @@ end
function cm.posfilter(c) function cm.posfilter(c)
return c:IsFaceup() and c:IsRace(RACE_GALAXY) and RD.IsCanChangePosition(c) return c:IsFaceup() and c:IsRace(RACE_GALAXY) and RD.IsCanChangePosition(c)
end end
cm.cost=RD.CostChangePosition(POS_FACEUP_DEFENSE) cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
RD.TargetDamage(1-tp,500) RD.TargetDamage(1-tp,500)
......
...@@ -14,7 +14,7 @@ function cm.initial_effect(c) ...@@ -14,7 +14,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
--Atk Up --Atk Up
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end
end end
......
...@@ -16,7 +16,7 @@ end ...@@ -16,7 +16,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler()) return RD.IsSummonTurn(e:GetHandler())
end end
cm.cost=RD.CostChangePosition() cm.cost=RD.CostChangeSelfPosition()
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
--Destroy --Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_THREE) return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_SELF)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return RD.IsSummonTurn(e:GetHandler()) and Duel.GetLP(tp)>=Duel.GetLP(1-tp) return RD.IsSummonTurn(e:GetHandler()) and Duel.GetLP(tp)>=Duel.GetLP(1-tp)
end end
cm.cost=RD.CostChangePosition(POS_FACEUP_DEFENSE) cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.operation(e,tp,eg,ep,ev,re,r,rp) function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
......
...@@ -22,7 +22,7 @@ end ...@@ -22,7 +22,7 @@ end
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9 return Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>9
end end
cm.cost=RD.CostChangePosition(POS_FACEUP_DEFENSE) cm.cost=RD.CostChangeSelfPosition(POS_FACEUP_ATTACK,POS_FACEUP_DEFENSE)
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
RD.Damage(1-tp,500) RD.Damage(1-tp,500)
......
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
--Destroy --Destroy
function cm.condition(e,tp,eg,ep,ev,re,r,rp) function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_THREE) return RD.IsSummonTurn(c) and c:IsSummonType(SUMMON_VALUE_SELF)
end end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(nil,tp,0,LOCATION_ONFIELD,1,nil) 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