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

2021/7/7 新增:大道魔法-光线转变,狂战士斗技场,7机会

parent 06c40097
No preview for this file type
...@@ -7,6 +7,7 @@ function cm.initial_effect(c) ...@@ -7,6 +7,7 @@ function cm.initial_effect(c)
e1:SetCategory(CATEGORY_DRAW) e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_SUMMON_SUCCESS) e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition) e1:SetCondition(cm.condition)
e1:SetTarget(cm.target) e1:SetTarget(cm.target)
e1:SetOperation(cm.activate) e1:SetOperation(cm.activate)
......
local m=120183039
local cm=_G["c"..m]
cm.name="大道魔法-光线转变"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCondition(cm.condition)
e1:SetCost(cm.cost)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.confilter(c)
return c:IsFaceup() and c:IsLevelAbove(7) and c:IsRace(RACE_SPELLCASTER)
end
function cm.costfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT) and c:IsAbleToGraveAsCost()
end
function cm.filter(c)
return c:IsFaceup() and c:IsLevelBelow(8)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(cm.confilter,tp,LOCATION_MZONE,0,1,nil)
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.costfilter,tp,LOCATION_HAND,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.costfilter,tp,LOCATION_HAND,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
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,0,1,nil)
and Duel.IsExistingMatchingCard(cm.filter,tp,0,LOCATION_MZONE,1,nil) end
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local sg=Duel.GetMatchingGroup(cm.filter,tp,0,LOCATION_MZONE,nil)
if sg:GetCount()==0 then return end
local _,atk=sg:GetMinGroup(Card.GetAttack)
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end
end
\ No newline at end of file
local m=120183056
local cm=_G["c"..m]
cm.name="狂战士斗技场"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(cm.cost)
c:RegisterEffect(e1)
--Atk Up
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetCode(EFFECT_UPDATE_ATTACK)
e2:SetRange(LOCATION_FZONE)
e2:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e2:SetTarget(cm.atktg)
e2:SetValue(100)
c:RegisterEffect(e2)
end
--Activate
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeckAsCost(tp,2) end
Duel.DiscardDeck(tp,2,REASON_COST)
end
--Atk Up
function cm.atktg(e,c)
return c:IsFaceup()
end
\ No newline at end of file
local m=120183058
local cm=_G["c"..m]
cm.name="7机会"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW+CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.filter(c)
return c:IsLevel(7) and c:IsLocation(LOCATION_HAND)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
return tc:IsControler(1-tp) and tc:IsLevelAbove(7)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,3) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(3)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,3)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local g=Duel.GetDecktopGroup(p,d)
if Duel.Draw(p,d,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-p,g)
local ct=g:FilterCount(cm.filter,nil)
if ct>1 then
Duel.Recover(tp,ct*1500,REASON_EFFECT)
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