本文整理汇总了C++中Shot::InitShotList方法的典型用法代码示例。如果您正苦于以下问题:C++ Shot::InitShotList方法的具体用法?C++ Shot::InitShotList怎么用?C++ Shot::InitShotList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Shot
的用法示例。
在下文中一共展示了Shot::InitShotList方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitTroopList
void Troop::InitTroopList() {
Shot *tmpsh;
tmpsh->InitShotList();
int ctr, ctr2;
maxtr=0;
TroopStats *s;
for(ctr=0; ctr<MAX_TROOPS; ++ctr) {
trp[ctr] = NULL;
}
for(ctr=0; ctr<TROOP_MAX; ++ctr) {
s=&defstat[ctr]; s->type=ctr;
for(ctr2=0; ctr2<8; ++ctr2) s->contains[ctr2]=NULL;
switch(ctr) {
case(TROOP_DOME): {
s->name="Non-combative Dome"; s->modnum=0;
s->cls=BUILDING_DOME;
s->wtype=WEAPON_NONE; s->mtype=MOVEMENT_DOME;
s->armor=1000; s->men=0; s->maxmen=1000; s->dodge=0; s->speed=0;
s->wdam=0; s->wmdam=0; s->wacc=0; s->wrng=0; s->wrof=0;
}break;
case(TROOP_HEAVY_LASERMASER): {
s->name="Heavy Laser-Maser"; s->modnum=0;
s->cls=BUILDING_HEAVY_LASERMASER;
s->wtype=WEAPON_LMASER; s->mtype=MOVEMENT_DOME;
s->armor=1000; s->men=1000; s->maxmen=1000; s->dodge=0; s->speed=0;
s->wdam=10; s->wmdam=30; s->wacc=500; s->wrng=120; s->wrof=0;
}break;
case(TROOP_BALLISTIC_DEFENDER): {
s->name="Ballistic Defender"; s->modnum=0;
s->cls=BUILDING_BALLISTIC_DEFENDER;
s->wtype=WEAPON_BALLISTIC; s->mtype=MOVEMENT_DOME;
s->armor=1000; s->men=1000; s->maxmen=1000; s->dodge=0; s->speed=0;
s->wdam=250; s->wmdam=125; s->wacc=750; s->wrng=310; s->wrof=40;
}break;
case(TROOP_DROPSHIP): {
s->name="Interatmospheric Dropship"; s->modnum=2;
s->cls=-1;
s->wtype=WEAPON_DEPLOY; s->mtype=MOVEMENT_DROP;
s->armor=500; s->men=1000; s->maxmen=1000; s->dodge=0; s->speed=0;
s->wdam=0; s->wmdam=0; s->wacc=0; s->wrng=0; s->wrof=0;
}break;
case(TROOP_BASE): {
s->name="Military Base"; s->modnum=4;
s->cls=BUILDING_MILITARY_BASE;
s->wtype=WEAPON_DEPLOY; s->mtype=MOVEMENT_DOME;
s->armor=1000; s->men=1000; s->maxmen=1000; s->dodge=0; s->speed=0;
s->wdam=0; s->wmdam=0; s->wacc=0; s->wrng=0; s->wrof=0;
}break;
case(TROOP_MARINE): {
s->name="Marine Platoon"; s->modnum=4;
s->cls=-1; s->wtype=WEAPON_GUN; s->mtype=MOVEMENT_WALK;
s->armor=10; s->men=200; s->maxmen=200; s->dodge=500; s->speed=100;
s->wdam=1; s->wmdam=20; s->wacc=800; s->wrng=45; s->wrof=10;
}break;
case(TROOP_ARTILLIARY): {
s->name="Artilliary Squad"; s->modnum=4;
s->cls=-1; s->wtype=WEAPON_BALLISTIC; s->mtype=MOVEMENT_WALK;
s->armor=10; s->men=200; s->maxmen=200; s->dodge=500; s->speed=100;
s->wdam=10; s->wmdam=10; s->wacc=500; s->wrng=100; s->wrof=20;
}break;
case(TROOP_BTANK): {
s->name="Ballistic Tank"; s->modnum=2;
s->cls=-1; s->wtype=WEAPON_BALLISTIC; s->mtype=MOVEMENT_DRIVE;
s->armor=100; s->men=100; s->maxmen=100; s->dodge=250; s->speed=50;
s->wdam=75; s->wmdam=35; s->wacc=600; s->wrng=120; s->wrof=40;
}break;
case(TROOP_LTANK): {
s->name="Laser Tank"; s->modnum=2;
s->cls=-1; s->wtype=WEAPON_LASER; s->mtype=MOVEMENT_DRIVE;
s->armor=100; s->men=100; s->maxmen=100; s->dodge=250; s->speed=50;
s->wdam=5; s->wmdam=7; s->wacc=400; s->wrng=100; s->wrof=0;
}break;
case(TROOP_MTANK): {
s->name="Maser Tank"; s->modnum=2;
s->cls=-1; s->wtype=WEAPON_MASER; s->mtype=MOVEMENT_DRIVE;
s->armor=100; s->men=100; s->maxmen=100; s->dodge=250; s->speed=50;
s->wdam=5; s->wmdam=10; s->wacc=400; s->wrng=80; s->wrof=0;
}break;
case(TROOP_BHEAVYTANK): {
s->name="Heavy Ballistic Tank"; s->modnum=1;
s->cls=-1; s->wtype=WEAPON_BALLISTIC; s->mtype=MOVEMENT_DRIVE;
s->armor=200; s->men=100; s->maxmen=100; s->dodge=100; s->speed=25;
s->wdam=250; s->wmdam=125; s->wacc=700; s->wrng=240; s->wrof=40;
}break;
case(TROOP_LHEAVYTANK): {
s->name="Heavy Laser Tank"; s->modnum=0;
s->cls=-1; s->wtype=WEAPON_LASER; s->mtype=MOVEMENT_DRIVE;
s->armor=200; s->men=100; s->maxmen=100; s->dodge=100; s->speed=25;
s->wdam=10; s->wmdam=9; s->wacc=500; s->wrng=200; s->wrof=0;
}break;
case(TROOP_MHEAVYTANK): {
s->name="Heavy Maser Tank"; s->modnum=1;
s->cls=-1; s->wtype=WEAPON_MASER; s->mtype=MOVEMENT_DRIVE;
s->armor=200; s->men=100; s->maxmen=100; s->dodge=100; s->speed=25;
s->wdam=10; s->wmdam=12; s->wacc=500; s->wrng=160; s->wrof=0;
}break;
case(TROOP_BMECH): {
s->name="Ballistic Mech"; s->modnum=2;
s->cls=-1; s->wtype=WEAPON_BALLISTIC; s->mtype=MOVEMENT_DRIVE;
s->armor=200; s->men=50; s->maxmen=50; s->dodge=100; s->speed=30;
//.........这里部分代码省略.........