Commit 81e883f1 authored by wind2009's avatar wind2009

Fix メンタルクロス・デーモン

parent 7c7a6467
...@@ -6,11 +6,13 @@ function s.initial_effect(c) ...@@ -6,11 +6,13 @@ function s.initial_effect(c)
c:EnableReviveLimit() c:EnableReviveLimit()
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(id,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetHintTiming(0,TIMING_MAIN_END)
e1:SetCountLimit(1,id) e1:SetCountLimit(1,id)
e1:SetCondition(s.spcon) e1:SetCondition(s.spcon)
e1:SetTarget(s.sptg) e1:SetTarget(s.sptg)
...@@ -18,10 +20,13 @@ function s.initial_effect(c) ...@@ -18,10 +20,13 @@ function s.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--lp and atk --lp and atk
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,1))
e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE) e2:SetCategory(CATEGORY_RECOVER+CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_QUICK_O) e2:SetType(EFFECT_TYPE_QUICK_O)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetHintTiming(TIMING_DAMAGE_STEP)
e2:SetCountLimit(1,id+o) e2:SetCountLimit(1,id+o)
e2:SetCondition(s.lpcon) e2:SetCondition(s.lpcon)
e2:SetCost(s.lpcost) e2:SetCost(s.lpcost)
...@@ -30,7 +35,7 @@ function s.initial_effect(c) ...@@ -30,7 +35,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.IsMainPhase()
end end
function s.spfilter(c,e,tp) function s.spfilter(c,e,tp)
return c:IsFaceupEx() and c:IsRace(RACE_PSYCHO) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP) return c:IsFaceupEx() and c:IsRace(RACE_PSYCHO) and c:IsLevelBelow(7) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP)
...@@ -45,21 +50,21 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -45,21 +50,21 @@ function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function s.spop(e,tp,eg,ep,ev,re,r,rp) function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToChain() then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
end end
function s.lpcon(e,tp,eg,ep,ev,re,r,rp) function s.lpcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()>PHASE_MAIN1 and Duel.GetCurrentPhase()<PHASE_MAIN2 return Duel.IsBattlePhase()
end end
function s.cfilter(c) function s.cfilter(c)
return not c:IsAttack(0) and c:IsRace(RACE_PSYCHO) return c:GetTextAttack()>0
end end
function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk) function s.lpcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1) e:SetLabel(1)
if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,e:GetHandler()) end if chk==0 then return Duel.CheckReleaseGroup(tp,s.cfilter,1,e:GetHandler()) end
local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,e:GetHandler()) local g=Duel.SelectReleaseGroup(tp,s.cfilter,1,1,e:GetHandler())
e:SetLabel(g:GetFirst():GetAttack()) e:SetLabel(g:GetFirst():GetTextAttack())
Duel.Release(g,REASON_COST) Duel.Release(g,REASON_COST)
end end
function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk) function s.lptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -73,7 +78,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp) ...@@ -73,7 +78,7 @@ function s.lpop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM) local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
local lp=Duel.Recover(p,d,REASON_EFFECT) local lp=Duel.Recover(p,d,REASON_EFFECT)
if lp>0 and c:IsFaceup() and c:IsRelateToEffect(e) then if lp>0 and c:IsFaceup() and c:IsRelateToChain() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE) e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
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