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) ...@@ -15,7 +15,7 @@ function c42671151.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk) function c42671151.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 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_RECOVER,nil,0,tp,ev)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
...@@ -23,7 +23,7 @@ end ...@@ -23,7 +23,7 @@ end
function c42671151.activate(e,tp,eg,ep,ev,re,r,rp) function c42671151.activate(e,tp,eg,ep,ev,re,r,rp)
local rec=Duel.Recover(tp,ev,REASON_EFFECT) local rec=Duel.Recover(tp,ev,REASON_EFFECT)
if rec~=ev or Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 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) local token=Duel.CreateToken(tp,42671152)
Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -68,9 +68,8 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -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 if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
local c=e:GetHandler() local c=e:GetHandler()
local val=e:GetLabelObject():GetLabel() 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) local token=Duel.CreateToken(tp,44330099)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK) e1:SetCode(EFFECT_SET_ATTACK)
...@@ -81,6 +80,7 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -81,6 +80,7 @@ function c44330098.sumop2(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_SET_DEFENCE) e2:SetCode(EFFECT_SET_DEFENCE)
e2:SetValue(val) e2:SetValue(val)
token:RegisterEffect(e2) token:RegisterEffect(e2)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end end
function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp) function c44330098.sumcon3(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1 return e:GetHandler():GetSummonType()==SUMMON_TYPE_SPECIAL+1
......
...@@ -13,7 +13,7 @@ function c67949763.initial_effect(c) ...@@ -13,7 +13,7 @@ function c67949763.initial_effect(c)
end end
function c67949763.filter(c,tp) function c67949763.filter(c,tp)
return c:IsFaceup() and c:IsType(TYPE_XYZ) 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 end
function c67949763.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) 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 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) ...@@ -34,7 +34,7 @@ function c67949763.activate(e,tp,eg,ep,ev,re,r,rp)
atk=tc:GetAttack() atk=tc:GetAttack()
cr=true cr=true
end 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 if cr then
local de=Effect.CreateEffect(e:GetHandler()) local de=Effect.CreateEffect(e:GetHandler())
de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) de:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
......
...@@ -6,18 +6,17 @@ function c74841885.initial_effect(c) ...@@ -6,18 +6,17 @@ function c74841885.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION) e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--summon success --tribute check
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EVENT_SUMMON_SUCCESS) e2:SetCode(EFFECT_MATERIAL_CHECK)
e2:SetCondition(c74841885.condition) e2:SetValue(c74841885.valcheck)
e2:SetOperation(c74841885.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
--tribute check --give negate effect only when summon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_MATERIAL_CHECK) e3:SetCode(EFFECT_SUMMON_COST)
e3:SetValue(c74841885.valcheck) e3:SetOperation(c74841885.facechk)
e3:SetLabelObject(e2) e3:SetLabelObject(e2)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
...@@ -33,50 +32,45 @@ function c74841885.valcheck(e,c) ...@@ -33,50 +32,45 @@ function c74841885.valcheck(e,c)
if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then if g:IsExists(c74841885.chkfilter,1,nil,RACE_FIEND,ATTRIBUTE_DARK) then
lbl=lbl+TYPE_TRAP lbl=lbl+TYPE_TRAP
end end
e:GetLabelObject():SetLabel(lbl) if e:GetLabel()==1 and lbl~=0 then
end --disable
function c74841885.condition(e,tp,eg,ep,ev,re,r,rp) local e1=Effect.CreateEffect(c)
return e:GetHandler():GetSummonType()==SUMMON_TYPE_ADVANCE and e:GetLabel()~=0 if lbl==TYPE_SPELL then
end e1:SetDescription(aux.Stringid(74841885,0))
function c74841885.operation(e,tp,eg,ep,ev,re,r,rp) elseif lbl==TYPE_TRAP then
--disable e1:SetDescription(aux.Stringid(74841885,1))
local c=e:GetHandler() else
local e1=Effect.CreateEffect(c) e1:SetDescription(aux.Stringid(74841885,2))
if e:GetLabel()==TYPE_SPELL then end
e1:SetDescription(aux.Stringid(74841885,0)) e1:SetProperty(EFFECT_FLAG_CLIENT_HINT)
elseif e:GetLabel()==TYPE_TRAP then e1:SetType(EFFECT_TYPE_FIELD)
e1:SetDescription(aux.Stringid(74841885,1)) e1:SetCode(EFFECT_DISABLE)
else e1:SetRange(LOCATION_MZONE)
e1:SetDescription(aux.Stringid(74841885,2)) e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE)
end e1:SetTarget(c74841885.distg)
e1:SetProperty(EFFECT_FLAG_CLIENT_HINT) e1:SetLabel(lbl)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetReset(RESET_EVENT+0xff0000)
e1:SetCode(EFFECT_DISABLE) c:RegisterEffect(e1)
e1:SetRange(LOCATION_MZONE) --disable effect
e1:SetTargetRange(LOCATION_SZONE,LOCATION_SZONE) local e2=Effect.CreateEffect(c)
e1:SetTarget(c74841885.distg) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetLabel(e:GetLabel()) e2:SetCode(EVENT_CHAIN_SOLVING)
e1:SetReset(RESET_EVENT+0x1ff0000) e2:SetRange(LOCATION_MZONE)
c:RegisterEffect(e1) e2:SetLabel(lbl)
--disable effect e2:SetOperation(c74841885.disop)
local e2=Effect.CreateEffect(c) e2:SetReset(RESET_EVENT+0xff0000)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) c:RegisterEffect(e2)
e2:SetCode(EVENT_CHAIN_SOLVING) if bit.band(lbl,TYPE_TRAP)~=0 then
e2:SetRange(LOCATION_MZONE) local e3=Effect.CreateEffect(c)
e2:SetLabel(e:GetLabel()) e3:SetType(EFFECT_TYPE_FIELD)
e2:SetOperation(c74841885.disop) e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e2:SetReset(RESET_EVENT+0x1ff0000) e3:SetRange(LOCATION_MZONE)
c:RegisterEffect(e2) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
if bit.band(e:GetLabel(),TYPE_TRAP)~=0 then e3:SetTarget(c74841885.distg)
local e3=Effect.CreateEffect(c) e3:SetLabel(TYPE_TRAP)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetReset(RESET_EVENT+0xff0000)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) c:RegisterEffect(e3)
e3:SetRange(LOCATION_MZONE) end
e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(c74841885.distg)
e3:SetLabel(TYPE_TRAP)
e3:SetReset(RESET_EVENT+0x1ff0000)
c:RegisterEffect(e3)
end end
end end
function c74841885.distg(e,c) function c74841885.distg(e,c)
...@@ -88,3 +82,6 @@ function c74841885.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -88,3 +82,6 @@ function c74841885.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev) Duel.NegateEffect(ev)
end end
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