Commit 3daf86d6 authored by salix5's avatar salix5

fix: gframe, damage_step

parent e3a9fa51
...@@ -273,14 +273,15 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -273,14 +273,15 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->cbCardType2->addItem(dataManager.GetSysString(1056), TYPE_MONSTER + TYPE_FUSION); mainGame->cbCardType2->addItem(dataManager.GetSysString(1056), TYPE_MONSTER + TYPE_FUSION);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1057), TYPE_MONSTER + TYPE_RITUAL); mainGame->cbCardType2->addItem(dataManager.GetSysString(1057), TYPE_MONSTER + TYPE_RITUAL);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO); mainGame->cbCardType2->addItem(dataManager.GetSysString(1063), TYPE_MONSTER + TYPE_SYNCHRO);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1075), TYPE_MONSTER + TYPE_SYNCHRO + TYPE_TUNER);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ); mainGame->cbCardType2->addItem(dataManager.GetSysString(1073), TYPE_MONSTER + TYPE_XYZ);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1062), TYPE_MONSTER + TYPE_TUNER); mainGame->cbCardType2->addItem(dataManager.GetSysString(1062), TYPE_MONSTER + TYPE_TUNER);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1061), TYPE_MONSTER + TYPE_DUAL); mainGame->cbCardType2->addItem(dataManager.GetSysString(1061), TYPE_MONSTER + TYPE_DUAL);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1060), TYPE_MONSTER + TYPE_UNION); mainGame->cbCardType2->addItem(dataManager.GetSysString(1060), TYPE_MONSTER + TYPE_UNION);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1059), TYPE_MONSTER + TYPE_SPIRIT); mainGame->cbCardType2->addItem(dataManager.GetSysString(1059), TYPE_MONSTER + TYPE_SPIRIT);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1071), TYPE_MONSTER + TYPE_FLIP); mainGame->cbCardType2->addItem(dataManager.GetSysString(1071), TYPE_MONSTER + TYPE_FLIP);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1072), TYPE_MONSTER + TYPE_TOON); mainGame->cbCardType2->addItem(dataManager.GetSysString(1072), TYPE_MONSTER + TYPE_TOON);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1074), TYPE_MONSTER + TYPE_PENDULUM);
break; break;
} }
case 2: { case 2: {
......
...@@ -384,7 +384,7 @@ bool Game::Initialize() { ...@@ -384,7 +384,7 @@ bool Game::Initialize() {
cbCardType->addItem(dataManager.GetSysString(1312)); cbCardType->addItem(dataManager.GetSysString(1312));
cbCardType->addItem(dataManager.GetSysString(1313)); cbCardType->addItem(dataManager.GetSysString(1313));
cbCardType->addItem(dataManager.GetSysString(1314)); cbCardType->addItem(dataManager.GetSysString(1314));
cbCardType2 = env->addComboBox(rect<s32>(130, 3, 190, 23), wFilter, -1); cbCardType2 = env->addComboBox(rect<s32>(125, 3, 200, 23), wFilter, -1);
cbCardType2->addItem(dataManager.GetSysString(1310), 0); cbCardType2->addItem(dataManager.GetSysString(1310), 0);
env->addStaticText(dataManager.GetSysString(1315), rect<s32>(205, 5, 280, 25), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1315), rect<s32>(205, 5, 280, 25), false, false, wFilter);
cbLimit = env->addComboBox(rect<s32>(260, 3, 390, 23), wFilter, -1); cbLimit = env->addComboBox(rect<s32>(260, 3, 390, 23), wFilter, -1);
...@@ -402,7 +402,7 @@ bool Game::Initialize() { ...@@ -402,7 +402,7 @@ bool Game::Initialize() {
env->addStaticText(dataManager.GetSysString(1321), rect<s32>(10, 51, 70, 71), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1321), rect<s32>(10, 51, 70, 71), false, false, wFilter);
cbRace = env->addComboBox(rect<s32>(60, 49, 190, 69), wFilter, -1); cbRace = env->addComboBox(rect<s32>(60, 49, 190, 69), wFilter, -1);
cbRace->addItem(dataManager.GetSysString(1310), 0); cbRace->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x400000; filter <<= 1) for(int filter = 0x1; filter != 0x800000; filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter), filter); cbRace->addItem(dataManager.FormatRace(filter), filter);
env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 28, 280, 48), false, false, wFilter); env->addStaticText(dataManager.GetSysString(1322), rect<s32>(205, 28, 280, 48), false, false, wFilter);
ebAttack = env->addEditBox(L"", rect<s32>(260, 26, 340, 46), true, wFilter); ebAttack = env->addEditBox(L"", rect<s32>(260, 26, 340, 46), true, wFilter);
......
...@@ -39,10 +39,10 @@ function c21454943.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -39,10 +39,10 @@ function c21454943.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if maxpay<def then maxpay=def end if maxpay<def then maxpay=def end
if maxpay<lp then lp=maxpay end if maxpay<lp then lp=maxpay end
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21454943,1)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(21454943,1))
if lp>500 then alp=Duel.AnnounceNumber(tp,100,200,300,400,500) if lp>=500 then alp=Duel.AnnounceNumber(tp,100,200,300,400,500)
elseif lp>400 then alp=Duel.AnnounceNumber(tp,100,200,300,400) elseif lp>=400 then alp=Duel.AnnounceNumber(tp,100,200,300,400)
elseif lp>300 then alp=Duel.AnnounceNumber(tp,100,200,300) elseif lp>=300 then alp=Duel.AnnounceNumber(tp,100,200,300)
elseif lp>200 then alp=Duel.AnnounceNumber(tp,100,200) elseif lp>=200 then alp=Duel.AnnounceNumber(tp,100,200)
end end
Duel.PayLPCost(tp,alp) Duel.PayLPCost(tp,alp)
e:SetLabel(-alp) e:SetLabel(-alp)
...@@ -57,7 +57,7 @@ end ...@@ -57,7 +57,7 @@ end
function c21454943.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c21454943.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
local c=e:GetHandler() local c=e:GetHandler()
if not tc or not tc:IsRelateToEffect(e) or not tc:IsRelateToBattle() or not tc:IsControler(1-tp) then return end if not tc or not tc:IsRelateToEffect(e) or not tc:IsControler(1-tp) then return end
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -35,6 +35,7 @@ function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,6 +35,7 @@ function c41925941.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if maxpay<def then maxpay=def end if maxpay<def then maxpay=def end
if maxpay<maxc then maxc=maxpay end if maxpay<maxc then maxc=maxpay end
if maxc>5000 then maxc=5000 end if maxc>5000 then maxc=5000 end
maxc=math.floor(maxc/100)*100
local t={} local t={}
for i=1,maxc/100 do for i=1,maxc/100 do
t[i]=i*100 t[i]=i*100
...@@ -52,7 +53,7 @@ end ...@@ -52,7 +53,7 @@ end
function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c41925941.operation(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=Duel.GetFirstTarget() local bc=Duel.GetFirstTarget()
local val=e:GetLabel() local val=e:GetLabel()
if not bc or not bc:IsRelateToEffect(e) or not bc:IsRelateToBattle() or not bc:IsControler(1-tp) then return end if not bc or not bc:IsRelateToEffect(e) or not bc:IsControler(1-tp) then return end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
...@@ -16,6 +16,7 @@ function c84389640.initial_effect(c) ...@@ -16,6 +16,7 @@ function c84389640.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP) e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCondition(c84389640.condition) e2:SetCondition(c84389640.condition)
e2:SetCost(c84389640.cost) e2:SetCost(c84389640.cost)
e2:SetTarget(c84389640.target)
e2:SetOperation(c84389640.operation) e2:SetOperation(c84389640.operation)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
...@@ -52,16 +53,20 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -52,16 +53,20 @@ function c84389640.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(-pay) e:SetLabel(-pay)
e:GetHandler():RegisterFlagEffect(84389640,RESET_PHASE+RESET_DAMAGE,0,1) e:GetHandler():RegisterFlagEffect(84389640,RESET_PHASE+RESET_DAMAGE,0,1)
end end
function c84389640.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tc=e:GetLabelObject()
if chkc then return chkc==tc end
if chk==0 then return tc:IsCanBeEffectTarget(e) end
Duel.SetTargetCard(tc)
end
function c84389640.operation(e,tp,eg,ep,ev,re,r,rp,chk) function c84389640.operation(e,tp,eg,ep,ev,re,r,rp,chk)
if not e:GetHandler():IsRelateToEffect(e) then return end local bc=Duel.GetFirstTarget()
local bc=e:GetLabelObject() if not e:GetHandler():IsRelateToEffect(e) or not bc or not bc:IsRelateToEffect(e) or not bc:IsControler(1-tp) then return end
if bc:IsRelateToBattle() and bc:IsFaceup() then local e1=Effect.CreateEffect(e:GetHandler())
local e1=Effect.CreateEffect(e:GetHandler()) e1:SetOwnerPlayer(tp)
e1:SetOwnerPlayer(tp) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END) e1:SetValue(e:GetLabel())
e1:SetValue(e:GetLabel()) bc:RegisterEffect(e1)
bc:RegisterEffect(e1)
end
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