Skip to content

Commit 1f8eaf8

Browse files
authored
Update "Shark Caesar (Anime)"
- Should evaluate the ATK change based on number of mats required to Summon it and the number currently - Slight script modernization update
1 parent bc9020c commit 1f8eaf8

File tree

1 file changed

+12
-20
lines changed

1 file changed

+12
-20
lines changed

unofficial/c511001778.lua

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,26 @@
1-
--牙鮫帝シャーク・カイゼル
1+
--牙鮫帝シャーク・カイゼル (Anime)
2+
--Shark Caesar (Anime)
23
local s,id=GetID()
34
function s.initial_effect(c)
4-
--xyz summon
5-
Xyz.AddProcedure(c,nil,3,4)
65
c:EnableReviveLimit()
7-
--attack up
6+
--Xyz Summon procedure: 4 Level 3 monsters
7+
Xyz.AddProcedure(c,nil,3,4)
8+
--Gains ATK equal to the difference of the number of materials required for its Summon and the number currently attached x 1000
89
local e1=Effect.CreateEffect(c)
910
e1:SetCategory(CATEGORY_ATKCHANGE)
1011
e1:SetDescription(aux.Stringid(69610924,0))
1112
e1:SetType(EFFECT_TYPE_IGNITION)
1213
e1:SetCountLimit(1)
1314
e1:SetRange(LOCATION_MZONE)
14-
e1:SetCost(s.cost)
15-
e1:SetOperation(s.operation)
15+
e1:SetCost(Cost.Detach(1))
16+
e1:SetOperation(s.atkop)
1617
c:RegisterEffect(e1,false,REGISTER_FLAG_DETACH_XMAT)
1718
end
18-
function s.cost(e,tp,eg,ep,ev,re,r,rp,chk)
19-
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
20-
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
21-
end
22-
function s.operation(e,tp,eg,ep,ev,re,r,rp)
19+
function s.atkop(e,tp,eg,ep,ev,re,r,rp)
2320
local c=e:GetHandler()
24-
local atk=(c:GetMaterialCount()-c:GetOverlayCount())*1000
21+
local minct=c.minxyzct
22+
local atk=(minct-c:GetOverlayCount())*1000
2523
if c:IsRelateToEffect(e) and c:IsFaceup() then
26-
local e1=Effect.CreateEffect(c)
27-
e1:SetType(EFFECT_TYPE_SINGLE)
28-
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
29-
e1:SetCode(EFFECT_UPDATE_ATTACK)
30-
e1:SetValue(atk)
31-
e1:SetReset(RESET_EVENT+RESETS_STANDARD_DISABLE)
32-
c:RegisterEffect(e1)
24+
c:UpdateAttack(atk)
3325
end
34-
end
26+
end

0 commit comments

Comments
 (0)