Skip to content

Commit

Permalink
Merge pull request #394 from eesast/dev
Browse files Browse the repository at this point in the history
v1.2.1
  • Loading branch information
DragonAura authored May 22, 2024
2 parents 1596a87 + af2639e commit df9d3f2
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 51 deletions.
51 changes: 27 additions & 24 deletions CAPI/cpp/API/include/constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,31 +17,33 @@ namespace Constants
SCCI int32_t numOfGridPerCell = 1000; // 单位坐标数
SCCI int32_t rows = 50; // 地图行数
SCCI int32_t cols = 50; // 地图列数
SCCI int32_t maxResourceProgress = 200;
SCCI int32_t maxResourceProgress = 32000;
SCCI int32_t maxWormholeHp = 18000;
SCCI double robPercent = 0.2; // 击杀获得经济比率
SCCI int32_t DestroyBuildingBonus = 200;
SCCI double recoverMultiplier = 1.2;
SCCI double recycleMultiplier = 0.5;
struct Home
{
SCCI int32_t maxHp = 24000;
SCCI int32_t maxHp = 48000;
SCCI int32_t energySpeed = 100;
SCCI int32_t attackRange = 8000;
SCCI int32_t damage = 300;
};
struct Factory
{
SCCI int32_t maxHp = 8000;
SCCI int32_t energySpeed = 300;
SCCI int32_t maxHp = 12000;
SCCI int32_t energySpeed = 200;
};
struct Community
{
SCCI int32_t maxHp = 6000;
SCCI int32_t maxHp = 10000;
};
struct Fort
{
SCCI int32_t maxHp = 12000;
SCCI int32_t maxHp = 16000;
SCCI int32_t attackRange = 8000;
SCCI int32_t damage = 1200;
SCCI int32_t damage = 300;
};

//
Expand Down Expand Up @@ -120,54 +122,55 @@ namespace Constants
// 子弹
struct Laser
{
SCCI int32_t Damage = 1200;
SCCI int32_t Damage = 800;
SCCI int32_t AttackRange = 4000;
SCCI double ArmorDamageMultiplier = 1.5;
SCCI double ShieldDamageMultiplier = 0.6;
SCCI int32_t Speed = 20000;
SCCI int32_t CastTime = 300; // ms
SCCI int32_t BackSwing = 300;
SCCI int32_t CastTime = 500; // ms
SCCI int32_t BackSwing = 1000;
};
struct Plasma
{
SCCI int32_t Damage = 1300;
SCCI int32_t Damage = 1000;
SCCI int32_t AttackRange = 4000;
SCCI double ArmorDamageMultiplier = 2.0;
SCCI double ShieldDamageMultiplier = 0.4;
SCCI int32_t Speed = 10000;
SCCI int32_t CastTime = 400; // ms
SCCI int32_t BackSwing = 400;
SCCI int32_t CastTime = 800; // ms
SCCI int32_t BackSwing = 1600;
};
struct Shell
{
SCCI int32_t Damage = 1800;
SCCI int32_t Damage = 1200;
SCCI int32_t AttackRange = 4000;
SCCI double ArmorDamageMultiplier = 0.4;
SCCI double ShieldDamageMultiplier = 1.5;
SCCI int32_t Speed = 8000;
SCCI int32_t CastTime = 200; // ms
SCCI int32_t BackSwing = 200;
SCCI int32_t CastTime = 500; // ms
SCCI int32_t BackSwing = 1000;
};
struct Missile
{
SCCI int32_t Damage = 1600;
SCCI int32_t AttackRange = 8000;
SCCI int32_t ExplodeRange = 1600;
SCCI int32_t AttackRange = 6000;
SCCI int32_t ExplodeRange = 1100;
SCCI double ArmorDamageMultiplier = 1.0;
SCCI double ShieldDamageMultiplier = 0.4;
SCCI int32_t Speed = 6000;
SCCI int32_t CastTime = 600; // ms
SCCI int32_t BackSwing = 600;
SCCI int32_t CastTime = 1200; // ms
SCCI int32_t BackSwing = 1800;
};
struct Arc
{
SCCI int32_t Damage = 3200; // 100-3200
SCCI int32_t AttackRange = 8000;
SCCI int32_t MinDamage = 800;
SCCI int32_t MaxDamage = 1600;
SCCI int32_t AttackRange = 6000;
SCCI double ArmorDamageMultiplier = 2.0;
SCCI double ShieldDamageMultiplier = 2.0;
SCCI int32_t Speed = 8000;
SCCI int32_t CastTime = 600; // ms
SCCI int32_t BackSwing = 600;
SCCI int32_t CastTime = 1200; // ms
SCCI int32_t BackSwing = 1800;
};
} // namespace Constants
#endif
51 changes: 27 additions & 24 deletions CAPI/python/PyAPI/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class Constants:
numofGridPerCell = 1000
rows = 50
cols = 50
maxResourceProgress = 200
maxResourceProgress = 32000
maxWormholeHp = 18000
robPercent = 0.2
destroyBuildingBonus = 200
Expand All @@ -13,23 +13,25 @@ class Constants:


class Home:
maxHp = 24000
maxHp = 48000
energySpeed = 100
damage = 300
attackRange = 8000


class Factory:
maxHp = 8000
energySpeed = 300
maxHp = 12000
energySpeed = 200


class Community:
maxHp = 6000
maxHp = 10000


class Fort:
maxHp = 12000
maxHp = 16000
attackRange = 8000
damage = 1200
damage = 300


class CivilianShip:
Expand Down Expand Up @@ -101,51 +103,52 @@ class Weapon:


class Laser:
Damage = 1200
Damage = 800
AttackRange = 4000
ArmorDamageMultiplier = 1.5
ShieldDamageMultiplier = 0.6
Speed = 20000
CastTime = 300
BackSwing = 300
CastTime = 500
BackSwing = 1000


class Plasma:
Damage = 1300
Damage = 1000
AttackRange = 4000
ArmorDamageMultiplier = 2.0
ShieldDamageMultiplier = 0.4
Speed = 10000
CastTime = 400
BackSwing = 400
CastTime = 800
BackSwing = 1600


class Shell:
Damage = 1800
Damage = 1200
AttackRange = 4000
ArmorDamageMultiplier = 0.4
ShieldDamageMultiplier = 1.5
Speed = 8000
CastTime = 200
BackSwing = 200
CastTime = 500
BackSwing = 1000


class Missle:
Damage = 1600
AttackRange = 8000
ExplodeRange = 1600
AttackRange = 6000
ExplodeRange = 1100
ArmorDamageMultiplier = 1.0
ShieldDamageMultiplier = 0.4
Speed = 6000
CastTime = 600
BackSwing = 600
CastTime = 1200
BackSwing = 1800


class Arc:
Damage = 3200
AttackRange = 8000
MinDamage = 800
MaxDamage = 1600
AttackRange = 6000
ArmorDamageMultiplier = 2.0
ShieldDamageMultiplier = 2.0
Speed = 8000
CastTime = 600
BackSwing = 600
CastTime = 1200
BackSwing = 1800
2 changes: 0 additions & 2 deletions logic/GameClass/GameObj/Areas/Construction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ public bool BeAttacked(Bullet bullet)
}
if (HP == 0)
{
lock (lockOfConstructionType)
constructionType = ConstructionType.Null;
IsActivated.Set(false);
}
return HP.IsBelowMaxTimes(0.5);
Expand Down
3 changes: 2 additions & 1 deletion logic/Gaming/AttackManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ private void BombObj(Bullet bullet, GameObj objBeingShot)
}
break;
case GameObjType.Wormhole:
var previousHP = ((WormholeCell)objBeingShot).Wormhole.HP;
((WormholeCell)objBeingShot).Wormhole.BeAttacked(bullet);
if (((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2)
if (previousHP >= GameData.WormholeHP / 2 && ((WormholeCell)objBeingShot).Wormhole.HP < GameData.WormholeHP / 2)
{
var shipList = gameMap.ShipInTheList(((WormholeCell)objBeingShot).Wormhole.Cells);
if (shipList != null)
Expand Down

0 comments on commit df9d3f2

Please sign in to comment.