Commit b319219c authored by VanillaSalt's avatar VanillaSalt

fix

parent 9f3a2f36
...@@ -12,7 +12,7 @@ function c50916353.initial_effect(c) ...@@ -12,7 +12,7 @@ function c50916353.initial_effect(c)
end end
function c50916353.regcon(e,tp,eg,ep,ev,re,r,rp) function c50916353.regcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return ep==tp and c:GetBattleTarget()==eg:GetFirst() return ep==tp and c==Duel.GetAttackTarget()
end end
function c50916353.regop(e,tp,eg,ep,ev,re,r,rp) function c50916353.regop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -21,12 +21,16 @@ function c50916353.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -21,12 +21,16 @@ function c50916353.regop(e,tp,eg,ep,ev,re,r,rp)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_BATTLE_DESTROYED) e1:SetCode(EVENT_BATTLE_DESTROYED)
e1:SetCondition(c50916353.damcon)
e1:SetTarget(c50916353.damtg) e1:SetTarget(c50916353.damtg)
e1:SetOperation(c50916353.damop) e1:SetOperation(c50916353.damop)
e1:SetLabel(ev) e1:SetLabel(ev)
e1:SetReset(RESET_PHASE+PHASE_DAMAGE) e1:SetReset(RESET_PHASE+PHASE_DAMAGE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c50916353.damcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_GRAVE)
end
function c50916353.damtg(e,tp,eg,ep,ev,re,r,rp,chk) function c50916353.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetTargetPlayer(1-tp) Duel.SetTargetPlayer(1-tp)
......
...@@ -15,6 +15,14 @@ function c85668449.initial_effect(c) ...@@ -15,6 +15,14 @@ function c85668449.initial_effect(c)
e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO)) e2:SetTarget(aux.TargetBoolFunction(Card.IsRace,RACE_PSYCHO))
e2:SetValue(c85668449.esop) e2:SetValue(c85668449.esop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetRange(LOCATION_FZONE)
e3:SetCode(EVENT_SUMMON_SUCCESS)
e3:SetCondition(c85668449.ctcon)
e3:SetOperation(c85668449.ctop)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
--lpcost replace --lpcost replace
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(85668449,0)) e3:SetDescription(aux.Stringid(85668449,0))
...@@ -22,7 +30,7 @@ function c85668449.initial_effect(c) ...@@ -22,7 +30,7 @@ function c85668449.initial_effect(c)
e3:SetRange(LOCATION_FZONE) e3:SetRange(LOCATION_FZONE)
e3:SetCode(EFFECT_LPCOST_REPLACE) e3:SetCode(EFFECT_LPCOST_REPLACE)
e3:SetCondition(c85668449.lrcon) e3:SetCondition(c85668449.lrcon)
e3:SetOperation(c85668449.lrop) e3:SetOperation(c85668449.ctop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--damage --damage
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
...@@ -38,6 +46,12 @@ function c85668449.initial_effect(c) ...@@ -38,6 +46,12 @@ function c85668449.initial_effect(c)
c:RegisterEffect(e5) c:RegisterEffect(e5)
end end
function c85668449.esop(e,c) function c85668449.esop(e,c)
c:RegisterFlagEffect(85668449,RESET_EVENT+0xfe0000+RESET_PHASE+PHASE_END,0,1)
end
function c85668449.ctcon(e,tp,eg,ep,ev,re,r,rp)
return eg:GetFirst():GetFlagEffect(85668449)~=0
end
function c85668449.ctop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x4,1) e:GetHandler():AddCounter(0x4,1)
end end
function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp) function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp)
...@@ -48,9 +62,6 @@ function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,9 +62,6 @@ function c85668449.lrcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler() local rc=re:GetHandler()
return rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_PSYCHO) return rc:IsLocation(LOCATION_MZONE) and rc:IsRace(RACE_PSYCHO)
end end
function c85668449.lrop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():AddCounter(0x4,1)
end
function c85668449.damp(e,tp,eg,ep,ev,re,r,rp) function c85668449.damp(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local ct=c:GetCounter(0x4) local ct=c:GetCounter(0x4)
......
...@@ -125,14 +125,13 @@ end ...@@ -125,14 +125,13 @@ end
function c96570609.sumop(e,tp,eg,ep,ev,re,r,rp) function c96570609.sumop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local sel=0 local pos=0
if c:IsSummonable(true,nil,1) and c:IsMSetable(true,nil,1) then if c:IsSummonable(true,nil,1) then pos=pos+POS_FACEUP_ATTACK end
sel=Duel.SelectOption(tp,1151,1153)+1 if c:IsMSetable(true,nil,1) then pos=pos+POS_FACEDOWN_DEFENCE end
elseif c:IsSummonable(true,nil,1) then if pos==0 then return end
sel=Duel.SelectOption(tp,1151)+1 if Duel.SelectPosition(tp,c,pos)==POS_FACEUP_ATTACK then
elseif c:IsMSetable(true,nil,1) then Duel.Summon(tp,c,true,nil,1)
sel=Duel.SelectOption(tp,1153)+2 else
Duel.MSet(tp,c,true,nil,1)
end end
if sel==1 then Duel.Summon(tp,c,true,nil,1) end
if sel==2 then Duel.MSet(tp,c,true,nil,1) end
end end
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