-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathc160006020.lua
30 lines (30 loc) · 1014 Bytes
/
c160006020.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
--和平の刺者
--Betrayer of Peace
local s,id=GetID()
function s.initial_effect(c)
--Change 1 of your defense position warrior monsters to attack position
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_POSITION)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetTarget(s.target)
e1:SetOperation(s.operation)
c:RegisterEffect(e1)
end
function s.posfilter(c)
return c:IsPosition(POS_FACEUP_ATTACK) and c:IsRace(RACE_WARRIOR) and c:IsCanChangePosition()
end
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_POSITION,nil,1,0,0)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
--Effect
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectMatchingCard(tp,s.posfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.HintSelection(g)
if #g>0 then
Duel.ChangePosition(g:GetFirst(),POS_FACEUP_DEFENSE)
end
end