Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions unofficial/c511027045.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--調律の魔術師 (Anime)
--Tuning Magician (Anime)
local s,id=GetID()
function s.initial_effect(c)
--You can take 400 damage, and if you do, your opponent gains 400 LP
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_RECOVER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_SUMMON_SUCCESS)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_DELAY)
e1:SetTarget(s.rectg)
e1:SetOperation(s.recop)
c:RegisterEffect(e1)
local e2=e1:Clone()
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
c:RegisterEffect(e2)
end
function s.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,400)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,1-tp,400)
end
function s.recop(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
if Duel.Damage(p,400,REASON_EFFECT)~=0 then
Duel.Recover(1-tp,400,REASON_EFFECT)
end
end