Commit 7b4c1756 authored by IamIpanda's avatar IamIpanda

Regular fixes

parent 806644b0
Pipeline #38632 passed with stages
in 47 seconds
.history
ygopro-scripts-define
.gitignore
.gitmodules
...@@ -10,6 +10,7 @@ function s.initial_effect(c) ...@@ -10,6 +10,7 @@ function s.initial_effect(c)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
e1:SetCondition(s.thcon) e1:SetCondition(s.thcon)
e1:SetTarget(s.thtg)
e1:SetCost(s.thcost) e1:SetCost(s.thcost)
e1:SetOperation(s.thop) e1:SetOperation(s.thop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -44,6 +45,9 @@ end ...@@ -44,6 +45,9 @@ end
function s.thfilter(c) function s.thfilter(c)
return c:IsAbleToHand() and c:IsSetCard(0x1b2) and c:IsType(TYPE_MONSTER) and not c:IsCode(id) return c:IsAbleToHand() and c:IsSetCard(0x1b2) and c:IsType(TYPE_MONSTER) and not c:IsCode(id)
end end
function s.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.thfilter,tp,LOCATION_DECK,0,1,nil)
end
function s.thop(e,tp,eg,ep,ev,re,r,rp) function s.thop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local h1=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil) local h1=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_DECK,0,nil)
......
...@@ -30,7 +30,7 @@ function s.filter(c) ...@@ -30,7 +30,7 @@ function s.filter(c)
end end
function s.costfilter(c) function s.costfilter(c)
local te=c:GetActivateEffect() local te=c:GetActivateEffect()
return c:GetType()==TYPE_TRAP and c:IsAbleToGraveAsCost() return c:GetType()==TYPE_TRAP and c:IsAbleToGraveAsCost() and te and te:GetCode()==EVENT_ATTACK_ANNOUNCE
end end
function s.costfilter2(c) function s.costfilter2(c)
return c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER) return c:IsAbleToGraveAsCost() and c:IsType(TYPE_MONSTER)
......
...@@ -40,6 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,6 +40,7 @@ function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e,tp) Duel.RegisterEffect(e,tp)
end end
-- override effect -- override effect
local c=e:GetHandler()
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING) e2:SetCode(EVENT_CHAIN_SOLVING)
......
...@@ -62,7 +62,7 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function s.ngop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function s.handcon(e,tp,eg,ep,ev,re,r,rp) function s.handcon(e,c)
return Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 --and ep~=tp return Duel.GetCustomActivityCount(id,e:GetHandlerPlayer(),ACTIVITY_CHAIN)==0 --and ep~=tp
end end
function s.chainfilter(re,tp,cid) function s.chainfilter(re,tp,cid)
......
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