Commit 8933d0b9 authored by VanillaSalt's avatar VanillaSalt

fix

parent 157ce72d
......@@ -260,6 +260,7 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
break;
}
case 1: {
wchar_t syntuner[32];
mainGame->cbCardType2->setEnabled(true);
mainGame->cbRace->setEnabled(true);
mainGame->cbAttribute->setEnabled(true);
......@@ -273,7 +274,8 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
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(1063), TYPE_MONSTER + TYPE_SYNCHRO);
mainGame->cbCardType2->addItem(dataManager.GetSysString(1075), TYPE_MONSTER + TYPE_SYNCHRO + TYPE_TUNER);
myswprintf(syntuner, L"%ls|%ls", dataManager.GetSysString(1063), dataManager.GetSysString(1062));
mainGame->cbCardType2->addItem(syntuner, TYPE_MONSTER + TYPE_SYNCHRO + TYPE_TUNER);
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);
......
......@@ -402,7 +402,7 @@ bool Game::Initialize() {
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->addItem(dataManager.GetSysString(1310), 0);
for(int filter = 0x1; filter != 0x800000; filter <<= 1)
for(int filter = 0x1; filter != 0x1000000; filter <<= 1)
cbRace->addItem(dataManager.FormatRace(filter), filter);
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);
......
......@@ -447,7 +447,9 @@ int32 scriptlib::effect_get_active_type(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_EFFECT, 1);
effect* peffect = *(effect**) lua_touserdata(L, 1);
if(peffect->type & 0x7f0)
if((peffect->type & EFFECT_TYPE_ACTIVATE) && (peffect->handler->data.type & TYPE_PENDULUM))
lua_pushinteger(L, TYPE_PENDULUM + TYPE_SPELL);
else if(peffect->type & 0x7f0)
lua_pushinteger(L, peffect->card_type);
else
lua_pushinteger(L, peffect->owner->get_type());
......@@ -459,7 +461,9 @@ int32 scriptlib::effect_is_active_type(lua_State *L) {
effect* peffect = *(effect**) lua_touserdata(L, 1);
uint32 tpe = lua_tointeger(L, 2);
uint32 atype;
if(peffect->type & 0x7f0)
if((peffect->type & EFFECT_TYPE_ACTIVATE) && (peffect->handler->data.type & TYPE_PENDULUM))
atype = TYPE_PENDULUM + TYPE_SPELL;
else if(peffect->type & 0x7f0)
atype = peffect->card_type;
else
atype = peffect->owner->get_type();
......
......@@ -25,7 +25,7 @@ function c17626381.drcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c17626381.cfilter,1,nil,tp)
end
function c17626381.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
if chk==0 then return not e:GetHandler():IsStatus(STATUS_CHAINING) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
......
......@@ -20,7 +20,7 @@ function c21454943.condition(e,tp,eg,ep,ev,re,r,rp)
if phase~=PHASE_DAMAGE or Duel.IsDamageCalculated() then return false end
local a=Duel.GetAttacker()
local d=Duel.GetAttackTarget()
if a:IsControler(tp) then
if a:IsControler(tp) then
e:SetLabelObject(d)
return a:IsFaceup() and a:IsRace(RACE_PSYCHO) and a:IsRelateToBattle() and d and d:IsFaceup() and d:IsRelateToBattle()
else
......@@ -30,9 +30,9 @@ function c21454943.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c21454943.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject()
if chk==0 then return Duel.CheckLPCost(tp,100) and e:GetHandler():GetFlagEffect(21454943)==0
if chk==0 then return Duel.CheckLPCost(tp,100) and e:GetHandler():GetFlagEffect(21454943)==0
and (bc:IsAttackAbove(100) or bc:IsDefenceAbove(100)) end
local lp=Duel.GetLP(tp)
local lp=Duel.GetLP(tp)-1
local alp=100
local maxpay=bc:GetAttack()
local def=bc:GetDefence()
......
......@@ -140,6 +140,7 @@
!system 1040 念动力
!system 1041 幻神兽
!system 1042 创造神
!system 1043 幻龙
!system 1050 怪兽
!system 1051 魔法
!system 1052 陷阱
......
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