Mud 版 (精华区)
发信人: Baggio (傻瓜牌生活), 信区: Mud
标 题: F_TEAM增强稿 xiha
发信站: 哈工大紫丁香 (Tue May 4 20:32:22 1999), 转信
发信人: xiha (随风), 信区: Mud_Builder
标 题: (转载)F_TEAM增强稿
发信站: 深圳大学荔园晨风电子公告牌 (Fri Apr 17 14:53:30 1998), 站内信件
发信人: jameson (阿其), 信区: Mud_Builder
标 题: Re: 双刀合壁不敌张三丰!(转自加拿大XKX)(转寄) (
发信站: BBS 水木清华站 (Wed May 28 13:03:51 1997)
当ATTACK 的时候判断他是否在ARRAY 里面,若是则把先机转移到TEAM HEAD那里
我有如下建议:
为team leader 作一个teamfight 指令,该指令负责完成所有teamers进入teamfight状
态 的设置.
作一门array skill为显示特殊的战斗场面提供类似query_action的接口.由于该函数可
获 取目前战斗中的object,从而就通过以上设定的标志来寻找改object的teamer加入回
显的战 斗信息.
在combatd中改动两处.一是skill_power,因为集体战斗模式的攻防当然不同于单独的战
斗 二是do_attack,在每一处result +=...的地方,加上判断,如果在集体战斗模式中,随
机地 选择是单独地dodge,parry,attack还是由该object的teamer为他提供dodge,parr
y,attack.
还有在F_ATTACK中作一个clean_up_teamer()其作用类似于clean_up_enemy(),用来判断
战斗现场尚留下来的teamer
作了以上几处变动之后,大概可以以此为基础引入一些集团攻击技巧了.
--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: 160.12.37.81]
发信人: jameson (阿其), 信区: Mud_Builder
标 题: F_TEAM修改初稿
发信站: BBS 水木清华站 (Thu May 29 21:36:20 1997)
#include <skill.h>
static object leader, *team;
static object *fight_team;
static string current_array;
// the following is add by James Yu
// this function is used to initialize your team, with a special skill
// only the leader can make the initial fight_team, while his league
// just copy leader's list
string query_current_array()
{
return current_array;
}
object *query_fight_team()
{
return fight_team;
}
int delete_fight_team()
{
current_array=0;
fight_team=0;
return 1;
}
varargs int set_fight_team(string zhen_fa, object *t)
{
int i;
object ob;
if( !arrayp(team) ) return 0;
if( !intp(this_object()->query_skill(zhen_fa,1)) ) return 0;
if( is_team_leader()) {
fight_team=team;
for( i=0; i<sizeof(fight_team); i++) {
if ( (environment(fight_team[i]) != environment())
|| (!living(fight_team[i]))
|| (!intp(this_object()->query_skill(zhen_fa,1))) ) {
if(pointerp(fight_team[i]->query_fight_team()))
fight_team[i]->delete_fight_team();
fight_team[i]=0;
}
}
fight_team -= ({ 0 });
current_array = zhen_fa;
for( i=0;i<sizeof(fight_team);i++) fight_team[i]->set_figh
t_team(zhen_fa, fight_team); } else {
fight_team = t;
current_array = zhen_fa;
}
return 1;
}
// this function is called by F_ATTACK, just after clear_up_enemy
// after this function is called, this_object might not be in this
// fight_team.
int clean_up_team(string zhen_fa)
{
if(!pointerp(query_fight_team()))
return 0;
if(is_team_leader()) {
set_fight_team(zhen_fa);
} else {
object ob=fight_team[0];
ob->set_fight_team((string)(ob->query_current_array()));
}
return 1;
}
--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: klab.ishii.utsu]
发信人: jameson (阿其), 信区: Mud_Builder
标 题: F_ATTACK修改初稿
发信站: BBS 水木清华站 (Thu May 29 21:52:54 1997)
private int attack()
{
object opponent;
object *teamers;
string array_skill;
clean_up_enemy();
if(pointerp(query_fight_team()))
clean_up_team(this_object()->query_current_array());
// since after clean_up_team, this_object() will be out of fight_te
am. if(pointerp(teamers=this_object()->query_fight_team())) {
array_skill=(string)teamers[0]->query_current_array();
SKILL_D(array_skill)->form_array(teamers,array_skill);
// if the above line return fail , call delete_fight_team in ea
ch member // of teamers.
}
opponent = select_opponent();
if( objectp(opponent) ) {
set_temp("last_opponent", opponent);
COMBAT_D->fight(this_object(), opponent);
return 1;
} else
return 0;
}
--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: klab.ishii.utsu]
发信人: jameson (阿其), 信区: Mud_Builder
标 题: CMD_TEAM
发信站: BBS 水木清华站 (Thu May 29 22:18:29 1997)
if( sscanf(arg, "form %s", arg)==1 ) {
if( !pointerp(t=me->query_team()) || !me->is_team_leader()
) return notify_fail("你必须是一个队伍的领袖才能组织
阵形。\n"); if( !me->query_skill(arg, 1) )
return notify_fail("这种阵形你没学过。\n");
return SKILL_D(arg)->form_array(me); // in form_array() cal
l set_fight_team; }
if( scanf(arg, "fight %s", arg)==1 ) {
if(!(me->is_team_leader()))
return notify_fail("you are not leader")
if(!(objectp(opponent_ob=presend(arg,environment(me)))))
return notify_fail("no this man\n");
if(!(stringp(me->query_current_array())))
return notify_fail("you should form array at first");
// call each member in your team to fight with him.;
}
}
.
--
※ 来源:·BBS 水木清华站 bbs.net.tsinghua.edu.cn·[FROM: klab.ishii.utsu]
[返回首页] [分类讨论区] [全部讨论区]
--
☆ 来源:.深大荔园晨风 bbs.szu.edu.cn.[FROM: www-post@linux.szu.e]
--
※ 转寄:.BBS 荔园晨风站 bbs.szu.edu.cn.[FROM: 172.18.32.20]
--
☆ 来源:.哈工大紫丁香 bbs.hit.edu.cn.[FROM: bin@fengyun.hit.edu.]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:7.426毫秒