Commit daa46303 authored by salix5's avatar salix5

fix

42671151  フリッグのリンゴ
44330098  冥府の使者ゴーズ
67949763  罪鍵の法-シン・キー・ロウ
These cards special summon tokens with text_atk "?", so IsPlayerCanSpecialSummonMonster() should use atk -2 when checking.
This is because the cards that put a sp_summon limit on atk(Ex. 74952447 かつて神と呼ばれた亀) depends on text_atk.

74841885  天魔神 インヴィシル
Now it grants negation effect at tribute check(before summon_success) instead of summon_success, which may avoid some problem with 83986578  王虎ワンフー and 44947065 強者の苦痛.
parent 194bd147
......@@ -15,7 +15,7 @@ function c42671151.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,ev,ev,1,RACE_FIEND,ATTRIBUTE_DARK) end
and Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) end
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,ev)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
......@@ -23,7 +23,7 @@ end
function c42671151.activate(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.Recover(tp,ev,REASON_EFFECT)
if rec~=ev or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,ev,ev,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
or not Duel.IsPlayerCanSpecialSummonMonster(tp,42671152,0,0x4011,-2,-2,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
local token=Duel.CreateToken(tp,42671152)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -68,9 +68,8 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler()
local val=e:GetLabelObject():GetLabel()
if not Duel.IsPlayerCanSpecialSummonMonster(tp,44330099,0,0x4011,0,0,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,44330099,0,0x4011,-2,-2,7,RACE_FAIRY,ATTRIBUTE_LIGHT) then return end
local token=Duel.CreateToken(tp,44330099)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK)
......@@ -81,6 +80,7 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(val)
token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
......@@ -13,7 +13,7 @@ function c67949763.initial_effect(c)
end
function c67949763.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ)
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,c:GetAttack(),0,1,RACE_FIEND,ATTRIBUTE_DARK)
and Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK)
end
function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c67949763.filter(chkc,tp) end
......@@ -34,7 +34,7 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
atk=tc:GetAttack()
cr=true
end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,atk,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
if not Duel.IsPlayerCanSpecialSummonMonster(tp,67949764,0x87,0x4011,-2,0,1,RACE_FIEND,ATTRIBUTE_DARK) then return end
if cr then
local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
......@@ -6,18 +6,17 @@ function c74841885.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--summon success
--tribute check
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetCondition(c74841885.condition)
e2:SetOperation(c74841885.operation)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetValue(c74841885.valcheck)
c:RegisterEffect(e2)
--tribute check
--give negate effect only when summon
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK)
e3:SetValue(c74841885.valcheck)
e3:SetCode(EFFECT_SUMMON_COST)
e3:SetOperation(c74841885.facechk)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
......@@ -33,50 +32,45 @@ function c74841885.valcheck(e,c)
if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then
lbl=lbl+TYPE_TRAP
end
e:GetLabelObject():SetLabel(lbl)
end
function c74841885.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()~=0
end
function c74841885.operation(e,tp,eg,ep,ev,re,r,rp)
--disable
local c=e:GetHandler()
local e1=Effect.CreateEffect(c)
if e:GetLabel()==TYPE_SPELL then
e1:SetDescription(aux.Stringid(74841885,0))
elseif e:GetLabel()==TYPE_TRAP then
e1:SetDescription(aux.Stringid(74841885,1))
else
e1:SetDescription(aux.Stringid(74841885,2))
end
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c74841885.distg)
e1:SetLabel(e:GetLabel())
e1:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetLabel(e:GetLabel())
e2:SetOperation(c74841885.disop)
e2:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e2)
if bit.band(e:GetLabel(),TYPE_TRAP)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c74841885.distg)
e3:SetLabel(TYPE_TRAP)
e3:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e3)
if e:GetLabel()==1 and lbl~=0 then
--disable
local e1=Effect.CreateEffect(c)
if lbl==TYPE_SPELL then
e1:SetDescription(aux.Stringid(74841885,0))
elseif lbl==TYPE_TRAP then
e1:SetDescription(aux.Stringid(74841885,1))
else
e1:SetDescription(aux.Stringid(74841885,2))
end
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_DISABLE)
e1:SetRange(LOCATION_MZONE)
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
e1:SetTarget(c74841885.distg)
e1:SetLabel(lbl)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
--disable effect
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_CHAIN_SOLVING)
e2:SetRange(LOCATION_MZONE)
e2:SetLabel(lbl)
e2:SetOperation(c74841885.disop)
e2:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e2)
if bit.band(lbl,TYPE_TRAP)~=0 then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c74841885.distg)
e3:SetLabel(TYPE_TRAP)
e3:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e3)
end
end
end
function c74841885.distg(e,c)
......@@ -88,3 +82,6 @@ function c74841885.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
end
end
function c74841885.facechk(e,tp,eg,ep,ev,re,r,rp)
e:GetLabelObject():SetLabel(1)
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