Skip to content

Commit 7d3dd17

Browse files
committed
added Soul Flip
1 parent b1cc8c1 commit 7d3dd17

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

rush/c160218055.lua

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--ソウルフリップ
2+
--Soul Flip
3+
--scripted by YoshiDuels
4+
local s,id=GetID()
5+
function s.initial_effect(c)
6+
--Activate
7+
local e1=Effect.CreateEffect(c)
8+
e1:SetDescription(aux.Stringid(id,0))
9+
e1:SetCategory(CATEGORY_POSITION+CATEGORY_ATKCHANGE)
10+
e1:SetType(EFFECT_TYPE_ACTIVATE)
11+
e1:SetCode(EVENT_SUMMON_SUCCESS)
12+
e1:SetCondition(s.condition)
13+
e1:SetTarget(s.target)
14+
e1:SetOperation(s.operation)
15+
c:RegisterEffect(e1)
16+
end
17+
function s.condition(e,tp,eg,ep,ev,re,r,rp)
18+
if #eg~=1 then return false end
19+
local tc=eg:GetFirst()
20+
return tc:IsFaceup() and tc:IsLevelBelow(4) and tc:IsType(TYPE_EFFECT) and tc:IsDefenseBelow(1400) and tc:IsCanTurnSet() and tc:IsCanChangePositionRush() and tc:IsSummonPlayer(1-tp)
21+
end
22+
function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
23+
if chk==0 then return true end
24+
Duel.SetOperationInfo(0,CATEGORY_POSITION,eg:GetFirst(),1,0,0)
25+
end
26+
function s.operation(e,tp,eg,ep,ev,re,r,rp)
27+
--Effect
28+
local tc=eg:GetFirst()
29+
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENSE)
30+
local attc=Duel.GetMatchingGroup(Card.IsMonster,tp,LOCATION_GRAVE,0,nil):GetClassCount(Card.GetAttribute)
31+
if attc>=3 and tc:IsControlerCanBeChanged() and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(id,1)) then
32+
Duel.GetControl(tc,tp)
33+
end
34+
end

0 commit comments

Comments
 (0)