Commit 207199a0 authored by salix5's avatar salix5

Merge pull request #137 from nekrozar/patch-2

fix Traptrix Nepenthes, Brotherhood of the Fire Fist - Dragon
parents f6018b16 aa63c096
......@@ -10,17 +10,24 @@ function c28201945.initial_effect(c)
c:RegisterEffect(e1)
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(28201945,0))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,28201945)
e2:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c28201945.spcon)
e2:SetTarget(c28201945.sptg)
e2:SetOperation(c28201945.spop)
e2:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(28201945,0))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCountLimit(1,28201945)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c28201945.spcon)
e3:SetTarget(c28201945.sptg)
e3:SetOperation(c28201945.spop)
c:RegisterEffect(e3)
end
function c28201945.efilter(e,te)
local c=te:GetHandler()
......@@ -28,7 +35,7 @@ function c28201945.efilter(e,te)
end
function c28201945.spcon(e,tp,eg,ep,ev,re,r,rp)
local c=re:GetHandler()
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89))
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and c:GetType()==TYPE_TRAP and (c:IsSetCard(0x4c) or c:IsSetCard(0x89)) and e:GetHandler():GetFlagEffect(1)>0
end
function c28201945.filter(c,e,tp,ft)
return c:IsSetCard(0x108a) and c:GetCode()~=28201945 and (c:IsAbleToHand() or (ft>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false)))
......
......@@ -2,32 +2,39 @@
function c43748308.initial_effect(c)
--set
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(43748308,0))
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_CHAIN_SOLVING)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(c43748308.setcon)
e1:SetTarget(c43748308.settg)
e1:SetOperation(c43748308.setop)
c:RegisterEffect(e1)
--spsummon
e1:SetOperation(aux.chainreg)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(43748308,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetDescription(aux.Stringid(43748308,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(c43748308.spcost)
e2:SetTarget(c43748308.sptg)
e2:SetOperation(c43748308.spop)
e2:SetCondition(c43748308.setcon)
e2:SetTarget(c43748308.settg)
e2:SetOperation(c43748308.setop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(43748308,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(c43748308.spcost)
e3:SetTarget(c43748308.sptg)
e3:SetOperation(c43748308.spop)
c:RegisterEffect(e3)
end
function c43748308.setcon(e,tp,eg,ep,ev,re,r,rp)
return rp==tp and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP)
and re:GetHandler():IsSetCard(0x7c)
and re:GetHandler():IsSetCard(0x7c) and e:GetHandler():GetFlagEffect(1)>0
end
function c43748308.filter(c)
return c:IsSetCard(0x7c) and c:IsType(TYPE_TRAP) and c:IsSSetable()
......
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