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

2021/2/15 更新:kp04

parent e4b77dfb
No preview for this file type
No preview for this file type
...@@ -25,7 +25,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -25,7 +25,7 @@ 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
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(m,1))
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,3,nil,e:GetHandler():GetRace()) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(cm.tdfilter),tp,LOCATION_GRAVE,0,1,3,nil,c:GetRace())
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(g)
local atk=g:GetSum(Card.GetLevel)*100 local atk=g:GetSum(Card.GetLevel)*100
......
local m=120155039 local m=120155039
local cm=_G["c"..m] local cm=_G["c"..m]
cm.name="TCB" cm.name="种族变更光线"
function cm.initial_effect(c) function cm.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -12,7 +12,8 @@ function cm.initial_effect(c) ...@@ -12,7 +12,8 @@ function cm.initial_effect(c)
end end
--Activate --Activate
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.GetFieldGroupCount(tp,LOCATION_DECK,0)>=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) end local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
if chk==0 then return ct>0 and Duel.GetFieldGroupCount(tp,LOCATION_DECK,0)>=ct end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD) local ct=Duel.GetFieldGroupCount(tp,0,LOCATION_ONFIELD)
......
local m=120155060
local cm=_G["c"..m]
cm.name="兽机界奥义 兽之拳"
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION+CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_ATTACK_ANNOUNCE)
e1:SetCondition(cm.condition)
e1:SetTarget(cm.target)
e1:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
--Activate
function cm.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
end
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:IsFaceup()
and c:IsLevel(7,8,9) and c:IsRace(RACE_BEASTWARRIOR+RACE_FIEND+RACE_MACHINE)
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetAttacker()
if chk==0 then return tc:IsAttackPos() and tc:IsCanChangePosition() and RushDuel.IsHasDefense(tc) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,tc,1,0,0)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetAttacker()
if tc:IsRelateToBattle() and tc:IsAttackPos()
and Duel.ChangePosition(tc,POS_FACEUP_DEFENSE)~=0
and tc:IsRace(RACE_DRAGON+RACE_SPELLCASTER+RACE_FAIRY)
and Duel.IsExistingMatchingCard(cm.desfilter,tp,0,LOCATION_ONFIELD,1,nil)
and Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,cm.desfilter,tp,0,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,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