魔兽世界Word文档格式.docx

上传人:b****4 文档编号:18459318 上传时间:2022-12-16 格式:DOCX 页数:21 大小:28.35KB
下载 相关 举报
魔兽世界Word文档格式.docx_第1页
第1页 / 共21页
魔兽世界Word文档格式.docx_第2页
第2页 / 共21页
魔兽世界Word文档格式.docx_第3页
第3页 / 共21页
魔兽世界Word文档格式.docx_第4页
第4页 / 共21页
魔兽世界Word文档格式.docx_第5页
第5页 / 共21页
点击查看更多>>
下载资源
资源描述

魔兽世界Word文档格式.docx

《魔兽世界Word文档格式.docx》由会员分享,可在线阅读,更多相关《魔兽世界Word文档格式.docx(21页珍藏版)》请在冰豆网上搜索。

魔兽世界Word文档格式.docx

如果司令部的生命元不足以奖励所有的武士,则优先奖励距离敌方司令部近的武士。

如果某武士在某城市的战斗中杀死了敌人,则该武士的司令部立即取得该城市中所有的生命元。

注意,司令部总是先奖励武士,然后再收回打了胜仗的城市的生命元。

对于因司令部生命元不足而领不到奖励的武士,司令部也不会在取得战利品生命元后为其补发奖励。

每次战斗都只有一方主动进攻一次。

战斗并非是你死我活的,可能是双方都幸存。

如果双方都幸存,则双方都不能拿走发生战斗的城市的生命元

在插红旗的城市,以及编号为奇数的无旗城市,由红武士主动发起进攻。

在插蓝旗的城市,以及编号为偶数的无旗城市,由蓝武士主动发起进攻。

一开始所有的城市都是无旗的。

当某个城市有连续两场战斗都是同一方的武士杀死敌人(两场战斗中间如果有若干个战斗时刻并没有发生战斗,则这两场战斗仍然算是连续的),那么该城市就会插上胜方的旗帜,若原来插着败方的旗帜,则败方旗帜落下。

旗帜一旦插上,就一直插着,直到被敌人更换。

一个城市最多只能插一面旗帜,旗帜没被敌人更换前,也不会再次插同颜色的旗。

不同的武士各有其特点:

dragon在一次在它主动进攻的战斗结束后,如果还没有战死,就会欢呼。

ninja挨打了也从不反击敌人。

iceman每前进两步,在第2步完成的时候,生命值会减少9,攻击力会增加20。

但是若生命值减9后会小于等于0,则生命值不减9,而是变为1。

即iceman不会因走多了而死。

lion若是战死,则其战斗前的生命值就会转移到对手身上。

在一个wolf通过主动攻击杀死敌人的次数达到偶数的时刻(次数从1开始算),在战斗完成后,该wolf生命值和攻击力都增加1倍。

如果其杀死的敌人是lion,则攻击力和生命值先加倍,然后才吸取lion的生命值。

获取总部的生命元奖励,发生在加倍之后。

只有在主动攻击杀死敌人时才能有加倍的事情,反击杀死敌人则不不会发生加倍。

武士到达对方司令部后就算完成任务了,从此就呆在那里无所事事。

任何一方的司令部里若是出现了2个敌人,则认为该司令部已被敌人占领。

任何一方的司令部被敌人占领,则战争结束。

战争结束之后就不会发生任何事情了。

给定一个时间,要求你将从0点0分开始到此时间为止的所有事件按顺序输出。

事件及其对应的输出样例如下:

1)武士降生

输出样例:

000:

00bluelion1born

表示在0点0分,编号为1的蓝魔lion武士降生

2)武士前进到某一城市

10rediceman1marchedtocity1with20elementsandforce30

表示在0点10分,红魔1号武士iceman前进到1号城市,此时他生命值为20,攻击力为30

对于iceman,输出的生命值和攻击力应该是变化后的数值

3)武士主动进攻

000:

40rediceman1attackedbluelion1incity1with20elementsandforce30

表示在0点40分,1号城市中,红魔1号武士iceman进攻蓝魔1号武士lion,在发起进攻前,红魔1号武士iceman生命值为20,攻击力为30

4)武士反击

001:

40bluedragon2foughtbackagainstredlion2incity1

表示在1点40分,1号城市中,蓝魔2号武士dragon反击红魔2号武士lion

5)武士战死

40redlion2waskilledincity1

6)武士欢呼

003:

40bluedragon2yelledincity4

7)武士获取生命元(elements)

40bluedragon2earned10elementsforhisheadquarter

8)旗帜升起

004:

40blueflagraisedincity4

9)武士抵达敌军司令部

10rediceman1reachedblueheadquarterwith20elementsandforce30

(此时他生命值为20,攻击力为30)对于iceman,输出的生命值和攻击力应该是变化后的数值

10)司令部被占领

10blueheadquarterwastaken

11)司令部报告生命元数量

50100elementsinredheadquarter

50120elementsinblueheadquarter

表示在0点50分,红方司令部有100个生命元,蓝方有120个

输出事件时:

首先按时间顺序输出;

同一时间发生的事件,按发生地点从西向东依次输出.武士前进的事件,算是发生在目的地。

在一次战斗中有可能发生上面的3至8号事件。

这些事件都算同时发生,其时间就是战斗开始时间。

一次战斗中的这些事件,序号小的应该先输出。

两个武士同时抵达同一城市,则先输出红武士的前进事件,后输出蓝武士的。

显然,10号事件发生之前的一瞬间一定发生了9号事件。

输出时,这两件事算同一时间发生,但是应先输出9号事件

虽然任何一方的司令部被占领之后,就不会有任何事情发生了。

但和司令部被占领同时发生的事件,全都要输出。

输入:

第一行是一个整数,代表测试数据组数

每组测试数据共三行。

第一行,三个整数M,N,T。

其含义为:

每个司令部一开始都有M个生命元

两个司令部之间一共有N个城市

要求输出从0时0分开始,到时间T为止(包括T)的所有事件。

T以分钟为单位,0<

=T<

=1000

第二行:

五个整数,依次是dragon、ninja、iceman、lion、wolf的初始生命值。

它们都大于0小于等于100

第三行:

五个整数,依次是dragon、ninja、iceman、lion、wolf的攻击力。

输出:

对每组测试数据,首先输出“Case:

n"

n是测试数据的编号,从1开始

接下来按恰当的顺序和格式输出到时间T为止发生的所有事件。

每个事件都以事件发生的时间开头,时间格式是“时:

分”,“时”有三位,“分”有两位。

SampleInput

2

9921000

1020505030

2050505050

4011000

2020202020

SampleOutput

Case:

1

00rediceman1born

00bluelion1born

10rediceman1marchedtocity1with50elementsandforce50

10bluelion1marchedtocity2with50elementsandforce50

30rediceman1earned10elementsforhisheadquarter

30bluelion1earned10elementsforhisheadquarter

5059elementsinredheadquarter

5059elementsinblueheadquarter

00redlion2born

00bluedragon2born

10redlion2marchedtocity1with50elementsandforce50

10bluelion1marchedtocity1with50elementsandforce50

10rediceman1marchedtocity2with41elementsandforce70

10bluedragon2marchedtocity2with10elementsandforce20

40redlion2attackedbluelion1incity1with50elementsandforce50

40bluelion1waskilledincity1

40redlion2earned10elementsforhisheadquarter

40bluedragon2attackedrediceman1incity2with10elementsandforce20

40rediceman1foughtbackagainstbluedragon2incity2

40bluedragon2waskilledincity2

40rediceman1earned10elementsforhisheadquarter

5021elementsinredheadquarter

5049elementsinblueheadquarter

002:

00blueninja3born

10redlion2marchedtocity2with100elementsandforce50

10blueninja3marchedtocity2with20elementsandforce50

10rediceman1reachedblueheadquarterwith29elementsandforce70

40blueninja3attackedredlion2incity2with20elementsandforce50

40redlion2foughtbackagainstblueninja3incity2

40blueninja3waskilledincity2

40redflagraisedincity2

5023elementsinredheadquarter

5029elementsinblueheadquarter

10redlion2reachedblueheadquarterwith58elementsandforce50

10blueheadquarterwastaken

10rediceman1marchedtocity1with20elementsandforce20

10bluelion1marchedtocity1with20elementsandforce20

40rediceman1attackedbluelion1incity1with20elementsandforce20

5022elementsinredheadquarter

5020elementsinblueheadquarter

10redlion2marchedtocity1with20elementsandforce20

10bluedragon2marchedtocity1with20elementsandforce20

10rediceman1reachedblueheadquarterwith39elementsandforce40

40redlion2attackedbluedragon2incity1with20elementsandforce20

40bluedragon2waskilledincity1

40redflagraisedincity1

5012elementsinredheadquarter

500elementsinblueheadquarter

10redlion2reachedblueheadquarterwith20elementsandforce20

 

代码:

#include<

iostream>

fstream>

string>

vector>

usingnamespacestd;

intdragon1[2];

intninja1[2];

inticeman1[2];

intlion1[2];

intwolf1[2];

intm;

//生命元

intm2;

intn;

//城市

intt;

//时间

inta=0;

inta2=0;

//武士

intRED=0;

intBLUE=0;

//胜利

classA

{

public:

intC;

//所在城市

intnum;

//编号

intM;

//生命值

intT;

//攻击力;

intsuccess;

stringrb;

};

classRed_Blue:

publicA

Red_Blue(intn,intm,intt,intc,strings)

{

num=n;

M=m;

T=t;

C=c;

rb=s;

}

classcity

city(intr,intb,intss)

red2=r;

blue3=b;

s=ss;

voidsets(intss)

s+=ss;

intgets()

returns;

voidsetred2(inte)

red2+=e;

intgetred2()

returnred2;

voidsetblue3(inte)

blue3+=e;

intgetblue3()

returnblue3;

private:

intred2;

//红旗

intblue3;

ints;

//城市生命元

classred_blue

voidinsert(ofstream&

fout,inti);

inttime1(ofstream&

voidtime2(vector<

city>

&

Cy);

voidtime3(ofstream&

fout,inti,vector<

&

Cy);

voidtime4(ofstream&

voidtime5(ofstream&

voidSum(ofstream&

fout,intj);

vector<

Red_Blue>

red;

blue;

voidred_blue:

:

Sum(ofstream&

fout,intj)

Cy;

inti;

for(i=0;

i<

=n+1;

i++)//0&

n+1城市不用

cityc(0,0,0);

Cy.push_back(c);

fout<

<

"

case:

j+1<

endl;

for(i=0;

=t;

i+=60)

insert(fout,i);

if(time1(fout,i))

break;

time2(Cy);

time3(fout,i,Cy);

time4(fout,i,Cy);

time5(fout,i);

RED=0;

BLUE=0;

Cy.clear();

red.clear();

blue.clear();

}

time4(ofstream&

Cy)//red.erase(&

red[t1]);

inti2,j;

for(i2=0;

i2<

red.size();

i2++)

for(j=0;

j<

blue.size();

j++)

if(red[i2].C==blue[j].C)

{

if(Cy[red[i2].C].getred2()==2||(Cy[blue[j].C].getblue3()!

=2&

red[i2].C%2!

=0))//红方进攻

{

blue[j].M-=red[i2].T;

fout<

00"

i/60<

40"

red"

red[i2].rb<

red[i2].num<

attackedblue"

blue[j].rb<

blue[j].num<

incity"

red[i2].C<

with"

red[i2].M<

elementsandforce"

red[i2].T<

if(blue[j].M<

0)

{

fout<

blue"

waskilledincity"

blue[j].C<

m+=Cy[blue[j].C].gets();

Cy[blue[j].C].sets(-Cy[blue[j].C].gets());

//清空城市生命元

if(blue[j].rb=="

lion"

red[i2].M+=blue[j].M;

if(m>

=8)

{

red[i].M+=8;

m-=8;

}

red"

earned"

Cy[red[i2].C].gets()<

elementsforhisheadquarter\n"

;

blue.erase(&

blue[j]);

}

if(blue[j].M>

0&

blue[j].rb!

="

ninja"

red[i2].M-=blue[j]

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 解决方案 > 学习计划

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1