📄 attackmagic.cpp
字号:
// AttackMagic.cpp: implementation of the CAttackMagic class.
//
//////////////////////////////////////////////////////////////////////
#include "..\stdafx.h"
#include "AttackMagic.h"
#include <math.h>
#include "OP_Magic.h"
#include "Op_Battle.h"
#include "CItem.h"
#include "AIManager.h"
#include "SymbolItemMgr.h" // 030506 kyo
#include "LogManager.h"
extern bool IsWar();
extern bool CanDestroyTarget(CHARLIST* pCaster,CHARLIST* pTarget);
extern void Send_CMD_SEALSTONE_STATUS(LPCHARLIST ch, int status);
///////////////////////////////////////////////////////////////////////////////
// Construction/Destruction
///////////////////////////////////////////////////////////////////////////////
CAttackMagic::CAttackMagic()
{
}
CAttackMagic::~CAttackMagic()
{
}
///////////////////////////////////////////////////////////////////////////////
// Public Method
///////////////////////////////////////////////////////////////////////////////
bool CAttackMagic::Bind()
{
Resist(FIRE_ARROW, &CAttackMagic::FireArrow);
Resist(FIRE_WALL, &CAttackMagic::FireWall);
Resist(FIRE_BALL, &CAttackMagic::FireBall);
Resist(SCORCHER, &CAttackMagic::Scorcher);
Resist(CIRCLE_FLAME, &CAttackMagic::CircleFlame);
Resist(FLAME_WAVE, &CAttackMagic::FlameWave);
Resist(APOCALYPSE, &CAttackMagic::Apocalypse);
Resist(PHEONIX, &CAttackMagic::Pheonix);
Resist(METEOR_STRIKE, &CAttackMagic::MeteorStrike);
Resist(GREAT_METEOR, &CAttackMagic::GreatMeteor);
Resist(FLYING_SPARK, &CAttackMagic::FlyingSpark);
Resist(FIRE_EXPLOSION, &CAttackMagic::FireExplosion);
Resist(FIRE_STORM, &CAttackMagic::FireStorm);
Resist(FIRE_BREATH, &CAttackMagic::FireBreath);
Resist(FLAME_PILLAR, &CAttackMagic::FlamePillar);
Resist(FLAME_POUR, &CAttackMagic::FlamePour);
Resist(ICE_ARROW, &CAttackMagic::IceArrow);
Resist(ICE_WALL, &CAttackMagic::IceWall);
Resist(ICE_BALL, &CAttackMagic::IceBall);
Resist(FREEZE_5TILE_RADIUS, &CAttackMagic::Freeze5TileRadius);
Resist(CIRCLE_ICE, &CAttackMagic::CircleIce);
Resist(ICE_STORM, &CAttackMagic::IceStorm);
Resist(FREEZE_9TILE_RADIUS, &CAttackMagic::Freeze9TileRadius);
Resist(FREEZING, &CAttackMagic::Freezing);
Resist(ICE_BREATH, &CAttackMagic::IceBreath);
Resist(LIGHTNING_BOLT, &CAttackMagic::LightningBolt);
Resist(CHAIN_LIGHTNING, &CAttackMagic::ChainLightning);
Resist(CIRCLE_LIGHTNING, &CAttackMagic::CircleLightning);
Resist(LIGHTNING, &CAttackMagic::Lightning);
Resist(GREAT_THUNDER_BOLT, &CAttackMagic::GreatThunderBolt);
Resist(LIGHTNING_5TILE_RADIUS, &CAttackMagic::Lightning5TileRadius);
Resist(BLITZ_SPEAR, &CAttackMagic::BlitzSpear);
Resist(LIGHTNING_CLOUD, &CAttackMagic::LightningCloud);
Resist(LIGHTNING_BREATH, &CAttackMagic::LightningBreath);
Resist(OCTA_LIGHTNING, &CAttackMagic::OctaLightning);
Resist(DEATH_FIRE, &CAttackMagic::DeathFire);
Resist(HOLY_FIRE, &CAttackMagic::HolyFire);
Resist(HOLY_LIGHT, &CAttackMagic::HolyLight);
Resist(HOLY_RAGE, &CAttackMagic::HolyRage);
Resist(TURN_UNDEAD, &CAttackMagic::TurnUndead);
Resist(DIVINE_POWER, &CAttackMagic::DivinePower);
Resist(AUTHORITY_CHARISNUMEN, &CAttackMagic::AuthorityCharisNumen); // CSD-021015
Resist(RAGE_STONE, &CAttackMagic::RageStone);
Resist(RAGE_BLAST, &CAttackMagic::RageBlast);
Resist(RAGE_LIGHT_BALL, &CAttackMagic::RageLightBall);
Resist(SHADOW_OF_EVIL, &CAttackMagic::ShadowOfEvil);
Resist(BLOOD_SPRINKLE, &CAttackMagic::BooldSprinkle);
Resist(FLAME_ARROW, &CAttackMagic::FlameArrow); // CSD-031020
Resist(AREA_BAT_ATTACK, &CAttackMagic::AreaBatAttack);
Resist(SNOWSTORM, &CAttackMagic::SnowStorm);// 030415 kyo
Resist(ICE_BREATH2, &CAttackMagic::IceBreath2);// 030415 kyo
Resist(BLOOD_LIGHTNING, &CAttackMagic::BloodLightning);// 030415 kyo
Resist(AUTHORITY_OF_WHOARENCHA ,&CAttackMagic::AuthorityOfWhoarencha);// 030415 kyo
return true;
}
bool CAttackMagic::FireArrow()
{ // [29]阂拳混
if (m_pCaster->equip[WT_WEAPON].item_no == 0)
{
return false;
}
const int nHD = GetMagicDamage(m_nIndex);
return AttackMagic(nHD);
}
bool CAttackMagic::FireWall()
{ // [34]拳堪寒
const int nHD = GetMagicDamage(m_nIndex);
return AttackMagic(nHD);
}
bool CAttackMagic::FireBall()
{ // [30]拳堪备
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Scorcher()
{ // [31]拳堪焙
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::CircleFlame()
{ // [33]规荤拳堪
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FlameWave()
{ // [35]框流捞绰 拳堪寒
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Apocalypse()
{ // [36]瘤苛狼 阂
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Pheonix()
{ // [109]阂货
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::MeteorStrike()
{ // [110]款籍
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::GreatMeteor()
{ // [85]措款籍
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FlyingSpark()
{ // [89]颇捞绢喉贰胶飘
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FireExplosion()
{ // [96]拳堪气惯
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FireStorm()
{ // [97]颇捞绢胶盆
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FireBreath()
{ // [102]拳堪宏饭静
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FlamePillar()
{ // [106]拳堪气浅
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::FlamePour()
{
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::IceArrow()
{ // [38]倔澜拳混
if (m_pCaster->equip[WT_WEAPON].item_no == 0)
{
return false;
}
const int nHD = GetMagicDamage(m_nIndex);
return AttackMagic(nHD);
}
bool CAttackMagic::IceWall()
{ // [42]倔澜寒
const int nHD = GetMagicDamage(m_nIndex);
return AttackMagic(nHD);
}
bool CAttackMagic::IceBall()
{ // [39]倔澜备
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Freeze5TileRadius()
{ // [41]馆版 5鸥老 倔覆
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::CircleIce()
{ // [43]盔屈倔澜 傍拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::IceStorm()
{ // [44]倔澜气浅
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Freeze9TileRadius()
{ // [45]馆版 9鸥老 倔府扁
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Freezing()
{ // [99]林困倔覆
const int nHD = CalcHitDice();
SetFrozen(1);
return AttackMagic(nHD);
}
bool CAttackMagic::IceBreath()
{ // [103]倔澜宏饭静
const int nHD = CalcHitDice();
SetFrozen(1);
return AttackMagic(nHD);
}
bool CAttackMagic::LightningBolt()
{ // [48]涵遏
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::ChainLightning()
{ // [50]蜡档 傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::CircleLightning()
{ // [51]盔屈 傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Lightning()
{ // [52]流急 傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::GreatThunderBolt()
{ // [84]措傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::Lightning5TileRadius()
{ // [54]馆版 5鸥老 傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::BlitzSpear()
{ // [100]锅俺芒
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::LightningCloud()
{ // [101]傈拜备抚
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::LightningBreath()
{ // [103]傈拜宏饭静
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::OctaLightning()
{ // [1078]规荤 傈拜
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::DeathFire()
{ // [87]单静颇捞绢
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::HolyFire()
{ // [165]己胶矾款 阂
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::HolyLight()
{ // [162]己胶矾款 蝴
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::HolyRage()
{ // [170]己胶矾款 盒畴
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::TurnUndead()
{ // [171]畔 攫单靛
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::DivinePower()
{ // [174]叼官牢 颇况
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::AuthorityCharisNumen()
{ // [182]墨府胶 穿膏狼 鼻瓷
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::RageStone()
{ // [189]措瘤狼 盒畴
const int nHD = CalcHitDice();
return AttackMagic(nHD);
}
bool CAttackMagic::RageBlast()
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -