Commit 3483dea6 authored by DailyShana's avatar DailyShana

fix activating spell by effect

parent 30f02688
......@@ -33,6 +33,6 @@ function c15248873.operation(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
......@@ -65,7 +65,6 @@ function c22499034.thop(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......@@ -33,7 +33,7 @@ function c22900598.activate(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local sg=Duel.GetMatchingGroup(aux.NecroValleyFilter(c22900598.spfilter),tp,LOCATION_GRAVE,0,nil,e,tp)
if sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(22900598,0)) then
......
......@@ -76,7 +76,7 @@ function c32912040.operation(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......@@ -23,18 +23,21 @@ function c4179255.initial_effect(c)
e1:SetTarget(c4179255.drtg)
e1:SetOperation(c4179255.drop)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY)
e2:SetDescription(aux.Stringid(4179255,1))
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c4179255.descon)
e2:SetTarget(c4179255.destg)
e2:SetOperation(c4179255.desop)
local e2=e1:Clone()
e2:SetCode(4179255)
c:RegisterEffect(e2)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetDescription(aux.Stringid(4179255,1))
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCondition(c4179255.descon)
e3:SetTarget(c4179255.destg)
e3:SetOperation(c4179255.desop)
c:RegisterEffect(e3)
end
function c4179255.drcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp and re and re:IsActiveType(TYPE_FIELD) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
......
......@@ -35,6 +35,6 @@ function c48934760.activate(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
......@@ -65,7 +65,6 @@ function c58984738.thop(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......@@ -85,7 +85,7 @@ function c69529337.operation(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......@@ -77,6 +77,6 @@ function c72332074.actop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
end
Duel.MoveToField(tc,tp,tp,LOCATION_SZONE,POS_FACEUP,true)
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
--EMスカイ・マジシャン
function c73734821.initial_effect(c)
--atk up
local e0=Effect.CreateEffect(c)
e0:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e0:SetCode(EVENT_CHAINING)
e0:SetRange(LOCATION_MZONE)
e0:SetOperation(aux.chainreg)
c:RegisterEffect(e0)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_CONTINUOUS+EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EVENT_CHAINING)
e1:SetDescription(aux.Stringid(73734821,0))
e1:SetCategory(CATEGORY_ATKCHANGE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_CHAIN_SOLVED)
e1:SetRange(LOCATION_MZONE)
e1:SetOperation(aux.chainreg)
e1:SetCountLimit(1)
e1:SetCondition(c73734821.atkcon)
e1:SetOperation(c73734821.atkop)
c:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(73734821,0))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetCode(EVENT_CHAIN_SOLVED)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(c73734821.atkcon)
e2:SetOperation(c73734821.atkop)
local e2=e1:Clone()
e2:SetCode(73734821)
c:RegisterEffect(e2)
--to hand
local e3=Effect.CreateEffect(c)
......@@ -83,7 +86,7 @@ function c73734821.thop(e,tp,eg,ep,ev,re,r,rp)
local tep=sc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(sc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(sc,73734821,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......
......@@ -54,7 +54,7 @@ function c95923441.operation(e,tp,eg,ep,ev,re,r,rp)
local tep=tc:GetControler()
local cost=te:GetCost()
if cost then cost(te,tep,eg,ep,ev,re,r,rp,1) end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,te,0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,te,0,tp,tp,Duel.GetCurrentChain())
end
end
end
......@@ -31,6 +31,6 @@ function c97970833.activate(e,tp,eg,ep,ev,re,r,rp)
if fc and fc:IsFaceup() and Duel.IsPlayerCanDraw(1-tp,1) and Duel.SelectYesNo(tp,aux.Stringid(97970833,0)) then
Duel.Draw(1-tp,1,REASON_EFFECT)
end
Duel.RaiseEvent(tc,EVENT_CHAIN_SOLVED,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
Duel.RaiseEvent(tc,4179255,tc:GetActivateEffect(),0,tp,tp,Duel.GetCurrentChain())
end
end
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