Commit 7167e525 authored by mercury233's avatar mercury233

Merge branch 'master' of https://github.com/Fluorohydride/ygopro-scripts into patch-sync-workaround

parents c6bab92c 39ed3bc5
......@@ -59,7 +59,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp,c)
e1:SetCode(EFFECT_CHANGE_CODE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(38033121)
e1:SetReset(RESET_EVENT+0xff0000)
e1:SetReset(RESET_EVENT+0xfe0000)
c:RegisterEffect(e1)
end
function s.thfilter(c)
......
......@@ -62,8 +62,8 @@ function c42158279.activate(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
end
end
function c42158279.thfilter(c)
return c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER)
function c42158279.thfilter(c,e)
return c:IsSetCard(0x145) and c:IsType(TYPE_MONSTER) and c:IsCanBeEffectTarget(e)
end
function c42158279.fselect(g)
return aux.dlvcheck(g) and g:IsExists(c42158279.fcheck,1,nil,g)
......@@ -75,8 +75,8 @@ function c42158279.fcheck2(c)
return c:IsAbleToDeck()
end
function c42158279.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local g=Duel.GetMatchingGroup(c42158279.thfilter,tp,LOCATION_GRAVE,0,nil)
if chkc then return false end
local g=Duel.GetMatchingGroup(c42158279.thfilter,tp,LOCATION_GRAVE,0,nil,e)
if chk==0 then return g:CheckSubGroup(c42158279.fselect,2,2) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local sg=g:SelectSubGroup(tp,c42158279.fselect,false,2,2)
......
......@@ -66,7 +66,7 @@ function s.thop(e,tp,eg,ep,ev,re,r,rp)
end
function s.aclimit(e,re)
local rc=re:GetHandler()
return re:IsActiveType(TYPE_MONSTER) and rc:IsLevelAbove(5) and rc:IsSummonLocation(LOCATION_EXTRA)
return re:IsActiveType(TYPE_MONSTER) and rc:IsLevelAbove(5) and rc:IsLocation(LOCATION_MZONE) and rc:IsSummonLocation(LOCATION_EXTRA)
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
......
......@@ -25,7 +25,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(id,0))
e3:SetDescription(aux.Stringid(id,2))
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
......
......@@ -25,6 +25,7 @@ function s.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,id+o)
e2:SetCondition(s.spcon)
e2:SetTarget(s.sptg)
e2:SetOperation(s.spop)
c:RegisterEffect(e2)
......@@ -56,6 +57,9 @@ function s.deop(e,tp,eg,ep,ev,re,r,rp)
end
end
end
function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0
end
function s.spfilter(c,e,tp)
return c:IsLevelBelow(5) and c:IsRace(RACE_MACHINE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
......
......@@ -34,7 +34,7 @@ function c72181263.initial_effect(c)
end
function c72181263.desfilter1(c,tp,ec,g)
return c:IsType(TYPE_SPELL+TYPE_TRAP)
and g:IsExists(c72181263.desfilter2,1,nil,tp,ec)
and g:IsExists(c72181263.desfilter2,1,c,tp,ec)
end
function c72181263.desfilter2(c,tp,ec)
return c~=ec and c:IsFaceup() and c:IsControler(tp) and c:IsSetCard(0xaf,0xae)
......
......@@ -21,7 +21,7 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function s.spfilter(c)
return c:IsSynchroSummonable(nil) and c:IsType(TYPE_TUNER)
return c:IsType(TYPE_TUNER) and c:IsSynchroSummonable(nil)
end
function s.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
......
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