Commit 6f571651 authored by wind2009's avatar wind2009

Merge branch 'patch-1' into 'master'

Fix 恋する乙女

See merge request !177
parents 9c84a26d 881a3b20
Pipeline #35212 failed with stages
in 1 minute and 36 seconds
-- --恋する乙女
local s,id,o=GetID() local s,id,o=GetID()
function s.initial_effect(c) function s.initial_effect(c)
--must attack --must attack
...@@ -25,14 +25,13 @@ function s.initial_effect(c) ...@@ -25,14 +25,13 @@ function s.initial_effect(c)
e4:SetDescription(aux.Stringid(id,0)) e4:SetDescription(aux.Stringid(id,0))
e4:SetCategory(CATEGORY_CONTROL+CATEGORY_COUNTER) e4:SetCategory(CATEGORY_CONTROL+CATEGORY_COUNTER)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCode(EVENT_DAMAGE_STEP_END) e4:SetCode(EVENT_DAMAGE_STEP_END)
e4:SetCondition(s.cccon) e4:SetCondition(s.cccon)
e4:SetTarget(s.cctg) e4:SetTarget(s.cctg)
e4:SetOperation(s.ccop) e4:SetOperation(s.ccop)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
s.counter_add_list={0x100e} s.counter_add_list={0x106e}
function s.atklimit(e,c) function s.atklimit(e,c)
return c==e:GetHandler() return c==e:GetHandler()
end end
...@@ -44,7 +43,7 @@ function s.cfilter(c) ...@@ -44,7 +43,7 @@ function s.cfilter(c)
end end
function s.cctg(e,tp,eg,ep,ev,re,r,rp,chk) function s.cctg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x106e,1) local b1=Duel.IsExistingMatchingCard(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,nil,0x106e,1)
local b2=Duel.IsExistingTarget(s.cfilter,tp,0,LOCATION_MZONE,1,nil) local b2=Duel.IsExistingMatchingCard(s.cfilter,tp,0,LOCATION_MZONE,1,nil)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 or b2 then if b1 or b2 then
...@@ -55,18 +54,18 @@ function s.cctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -55,18 +54,18 @@ function s.cctg(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(op) e:SetLabel(op)
if op==1 then if op==1 then
e:SetCategory(CATEGORY_COUNTER) e:SetCategory(CATEGORY_COUNTER)
local g=Duel.GetMatchingGroup(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x106e,1) local g=Duel.GetMatchingGroup(Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x106e,1)
Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_COUNTER,g,1,0,0)
elseif op==2 then elseif op==2 then
e:SetCategory(CATEGORY_CONTROL) e:SetCategory(CATEGORY_CONTROL)
local g=Duel.GetMatchingGroup(tp,s.cfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.GetMatchingGroup(s.cfilter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_CONTROL,g,1,0,0)
end end
end end
function s.ccop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function s.ccop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if e:GetLabel()==1 then if e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x106e,1) local g=Duel.SelectMatchingCard(tp,Card.IsCanAddCounter,tp,0,LOCATION_MZONE,1,1,nil,0x106e,1)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
tc:AddCounter(0x106e,1) tc:AddCounter(0x106e,1)
...@@ -80,9 +79,3 @@ function s.ccop(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -80,9 +79,3 @@ function s.ccop(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
end end
end end
function s.ccop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(1-tp) then
tc:AddCounter(0x106e,1)
end
end
\ No newline at end of file
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