분신을 만드는 기술
2007.04.12 11:46
long ply_duplicate_time[PMAX];
int duplicate(ply_ptr, cmnd)
creature *ply_ptr;
cmd *cmnd;
{
creature *att_ptr, *crt_ptr;
room *rom_ptr;
int fd, n, chance=0, mon_num=600;
long t;
char name[80], talk[80], description[80];
fd = ply_ptr->fd;
rom_ptr = ply_ptr->parent_rom;
if(fd < 0) return(0);
if(ply_ptr->class < INVINCIBLE && \
!(ply_ptr->class == ASSASSIN && ply_ptr->level >= 50)) {
print(fd, "자객 레벨 50이상만 쓸수 있는 기술입니다.\n");
return(0);
}
if(ply_ptr->class >= INVINCIBLE && !S_ISSET(ply_ptr, SASSASSIN)) {
print(fd, "아직 자객 직업을 수련하지 않았습니다.\n");
return(0);
}
if(F_ISSET(ply_ptr, PBLIND)) {
ANSI(fd, BOLD);
ANSI(fd, RED);
print(fd, "당신은 눈이 멀어 있습니다!");
ANSI(fd, WHITE);
ANSI(fd, NORMAL);
return(0);
}
t = time(0);
if(ply_duplicate_time[fd] > t) {
please_wait(fd, ply_duplicate_time[fd] -t);
return(0);
}
if(!dec_daily(&ply_ptr->daily[DL_DUPLI]) && ply_ptr->class < SUB_DM) {
print(fd,"\n당신의 몸이 너무 피곤해 분신술을 더 이상 펼칠 수 없습니다.");
return(0);
}
att_ptr = find_crt(ply_ptr, rom_ptr->first_mon,
cmnd->str[1], cmnd->val[1]);
if(!att_ptr || strlen(cmnd->str[1]) < 2 ) {
print(fd, "그런 것은 여기 없습니다.");
return(0);
}
if(F_ISSET(att_ptr, MUNKIL)) {
print(fd, "당신은 %s를 해칠 수 없습니다.\n",
F_ISSET(att_ptr, MMALES) ? "그":"그녀");
return(0);
}
ply_ptr->lasttime[LT_ATTCK].ltime = t;
chance = 50 + (ply_ptr->level+3)/4 - (att_ptr->level+3)/4 + \
bonus[(int)ply_ptr->intelligence]*5 + bonus[(int)ply_ptr->piety]*3;
chance = MIN(80, chance);
if(mrand(1,100) <= chance) {
if(load_crt(mon_num, &crt_ptr) < 0) {
print(fd, "\n지금은 분신술을 펼칠 수 없습니다.");
return(0);
}
sprintf(name, "%s의 분신", ply_ptr->name);
sprintf(talk, "나는 %s의 분신이라네.", ply_ptr->name);
sprintf(description, "%s의 분신이 %s있습니다.", ply_ptr->name, \
no_ansi_print(ply_ptr, ply_ptr->description));
strncpy(crt_ptr->name , name, 80);
strncpy(crt_ptr->talk , talk, 80);
strncpy(crt_ptr->description , description, 80);
crt_ptr->level = ply_ptr->level;
crt_ptr->class = ply_ptr->class;
crt_ptr->race = ply_ptr->race;
crt_ptr->alignment = ply_ptr-> alignment;
crt_ptr->strength = ply_ptr->strength;
crt_ptr->dexterity = ply_ptr->dexterity;
crt_ptr->constitution = ply_ptr->constitution;
crt_ptr->intelligence = ply_ptr->intelligence;
crt_ptr->piety = ply_ptr->piety;
crt_ptr->hpmax = MIN(10000, ply_ptr->hpmax*2);
crt_ptr->hpcur = MIN(10000, ply_ptr->hpcur*2);
crt_ptr->mpmax = MIN(10000, ply_ptr->mpmax*2);
crt_ptr->mpcur = MIN(10000, ply_ptr->mpcur*2);
crt_ptr->ndice = ply_ptr->ndice*2;
crt_ptr->sdice = ply_ptr->sdice*2;
crt_ptr->pdice = ply_ptr->pdice*2;
crt_ptr->experience = 100;
crt_ptr->gold = 10;
F_SET(crt_ptr, MFLEER);
F_SET(crt_ptr, MPOISS);
F_SET(crt_ptr, MMAGIC);
F_SET(crt_ptr, MMOBIL);
if(F_ISSET(ply_ptr, PMALES))
F_SET(crt_ptr, MMALES);
crt_ptr->lasttime[LT_ATTCK].ltime =
crt_ptr->lasttime[LT_MSCAV].ltime =
crt_ptr->lasttime[LT_MWAND].ltime = t;
if(crt_ptr->dexterity < 20)
crt_ptr->lasttime[LT_ATTCK].interval = 3;
else
crt_ptr->lasttime[LT_ATTCK].interval = 2;
strncpy(crt_ptr->key[0] , ply_ptr->name, 20);
strncpy(crt_ptr->key[1] , "분신", 20);
strncpy(crt_ptr->key[2] , ply_ptr->name, 20);
add_crt_rom(crt_ptr, rom_ptr, 0);
add_active(crt_ptr);
add_enm_crt(ply_ptr->name, att_ptr);
add_enm_crt(att_ptr->name, crt_ptr);
n = attack_mon(crt_ptr, att_ptr);
ply_duplicate_time[fd] = t+ (50-ply_ptr->intelligence/7);
if(n>0)
return(0);
}
else {
print(fd, "\n당신의 분신술이 실패했습니다.");
broadcast_rom(fd, ply_ptr->rom_num,
"\n%M이 분신술을 시도합니다.", ply_ptr);
F_CLR(ply_ptr, PHIDDN);
if(F_ISSET(ply_ptr, PINVIS)) {
F_CLR(ply_ptr, PINVIS);
print(fd, "\n당신의 모습이 서서히 드러납니다.");
broadcast_rom(fd, ply_ptr->rom_num, "\n%M의 모습이 서서히 드러납니다.",
ply_ptr);
}
ply_ptr->hpcur /= 2;
ply_ptr->mpcur /= 2;
add_enm_crt(ply_ptr->name, att_ptr);
ply_duplicate_time[fd] = t+ (30 -MIN(7, ply_ptr->intelligence/3));
}
return(0);
}
홈지기 "그륨"
int duplicate(ply_ptr, cmnd)
creature *ply_ptr;
cmd *cmnd;
{
creature *att_ptr, *crt_ptr;
room *rom_ptr;
int fd, n, chance=0, mon_num=600;
long t;
char name[80], talk[80], description[80];
fd = ply_ptr->fd;
rom_ptr = ply_ptr->parent_rom;
if(fd < 0) return(0);
if(ply_ptr->class < INVINCIBLE && \
!(ply_ptr->class == ASSASSIN && ply_ptr->level >= 50)) {
print(fd, "자객 레벨 50이상만 쓸수 있는 기술입니다.\n");
return(0);
}
if(ply_ptr->class >= INVINCIBLE && !S_ISSET(ply_ptr, SASSASSIN)) {
print(fd, "아직 자객 직업을 수련하지 않았습니다.\n");
return(0);
}
if(F_ISSET(ply_ptr, PBLIND)) {
ANSI(fd, BOLD);
ANSI(fd, RED);
print(fd, "당신은 눈이 멀어 있습니다!");
ANSI(fd, WHITE);
ANSI(fd, NORMAL);
return(0);
}
t = time(0);
if(ply_duplicate_time[fd] > t) {
please_wait(fd, ply_duplicate_time[fd] -t);
return(0);
}
if(!dec_daily(&ply_ptr->daily[DL_DUPLI]) && ply_ptr->class < SUB_DM) {
print(fd,"\n당신의 몸이 너무 피곤해 분신술을 더 이상 펼칠 수 없습니다.");
return(0);
}
att_ptr = find_crt(ply_ptr, rom_ptr->first_mon,
cmnd->str[1], cmnd->val[1]);
if(!att_ptr || strlen(cmnd->str[1]) < 2 ) {
print(fd, "그런 것은 여기 없습니다.");
return(0);
}
if(F_ISSET(att_ptr, MUNKIL)) {
print(fd, "당신은 %s를 해칠 수 없습니다.\n",
F_ISSET(att_ptr, MMALES) ? "그":"그녀");
return(0);
}
ply_ptr->lasttime[LT_ATTCK].ltime = t;
chance = 50 + (ply_ptr->level+3)/4 - (att_ptr->level+3)/4 + \
bonus[(int)ply_ptr->intelligence]*5 + bonus[(int)ply_ptr->piety]*3;
chance = MIN(80, chance);
if(mrand(1,100) <= chance) {
if(load_crt(mon_num, &crt_ptr) < 0) {
print(fd, "\n지금은 분신술을 펼칠 수 없습니다.");
return(0);
}
sprintf(name, "%s의 분신", ply_ptr->name);
sprintf(talk, "나는 %s의 분신이라네.", ply_ptr->name);
sprintf(description, "%s의 분신이 %s있습니다.", ply_ptr->name, \
no_ansi_print(ply_ptr, ply_ptr->description));
strncpy(crt_ptr->name , name, 80);
strncpy(crt_ptr->talk , talk, 80);
strncpy(crt_ptr->description , description, 80);
crt_ptr->level = ply_ptr->level;
crt_ptr->class = ply_ptr->class;
crt_ptr->race = ply_ptr->race;
crt_ptr->alignment = ply_ptr-> alignment;
crt_ptr->strength = ply_ptr->strength;
crt_ptr->dexterity = ply_ptr->dexterity;
crt_ptr->constitution = ply_ptr->constitution;
crt_ptr->intelligence = ply_ptr->intelligence;
crt_ptr->piety = ply_ptr->piety;
crt_ptr->hpmax = MIN(10000, ply_ptr->hpmax*2);
crt_ptr->hpcur = MIN(10000, ply_ptr->hpcur*2);
crt_ptr->mpmax = MIN(10000, ply_ptr->mpmax*2);
crt_ptr->mpcur = MIN(10000, ply_ptr->mpcur*2);
crt_ptr->ndice = ply_ptr->ndice*2;
crt_ptr->sdice = ply_ptr->sdice*2;
crt_ptr->pdice = ply_ptr->pdice*2;
crt_ptr->experience = 100;
crt_ptr->gold = 10;
F_SET(crt_ptr, MFLEER);
F_SET(crt_ptr, MPOISS);
F_SET(crt_ptr, MMAGIC);
F_SET(crt_ptr, MMOBIL);
if(F_ISSET(ply_ptr, PMALES))
F_SET(crt_ptr, MMALES);
crt_ptr->lasttime[LT_ATTCK].ltime =
crt_ptr->lasttime[LT_MSCAV].ltime =
crt_ptr->lasttime[LT_MWAND].ltime = t;
if(crt_ptr->dexterity < 20)
crt_ptr->lasttime[LT_ATTCK].interval = 3;
else
crt_ptr->lasttime[LT_ATTCK].interval = 2;
strncpy(crt_ptr->key[0] , ply_ptr->name, 20);
strncpy(crt_ptr->key[1] , "분신", 20);
strncpy(crt_ptr->key[2] , ply_ptr->name, 20);
add_crt_rom(crt_ptr, rom_ptr, 0);
add_active(crt_ptr);
add_enm_crt(ply_ptr->name, att_ptr);
add_enm_crt(att_ptr->name, crt_ptr);
n = attack_mon(crt_ptr, att_ptr);
ply_duplicate_time[fd] = t+ (50-ply_ptr->intelligence/7);
if(n>0)
return(0);
}
else {
print(fd, "\n당신의 분신술이 실패했습니다.");
broadcast_rom(fd, ply_ptr->rom_num,
"\n%M이 분신술을 시도합니다.", ply_ptr);
F_CLR(ply_ptr, PHIDDN);
if(F_ISSET(ply_ptr, PINVIS)) {
F_CLR(ply_ptr, PINVIS);
print(fd, "\n당신의 모습이 서서히 드러납니다.");
broadcast_rom(fd, ply_ptr->rom_num, "\n%M의 모습이 서서히 드러납니다.",
ply_ptr);
}
ply_ptr->hpcur /= 2;
ply_ptr->mpcur /= 2;
add_enm_crt(ply_ptr->name, att_ptr);
ply_duplicate_time[fd] = t+ (30 -MIN(7, ply_ptr->intelligence/3));
}
return(0);
}
홈지기 "그륨"
댓글 0
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
77 | *괴물이름 방폭 버그 수정 | 그리움 | 2007.04.12 | 533 |
76 | 연타기능 - 직업별 연타 | 그리움 | 2007.04.12 | 479 |
75 | 게시판 버그 해결 방법. | 그리움 | 2007.04.12 | 470 |
74 | 연타기능 - 연타수 자동 | 그리움 | 2007.04.12 | 447 |
73 | 무한대전 방 데이터 Convert | 그리움 | 2007.11.23 | 423 |
72 | 주민등록번호 검사 소스 | 그리움 | 2007.04.12 | 420 |
71 | 몹 소환하여 소환몹이 대신 싸우게 하기 | 그리움 | 2007.11.23 | 398 |
70 | 물건, 몹의 번호 찾아내기. | 그리움 | 2007.07.04 | 392 |
69 | 감옥/퇴소 | 그리움 | 2007.04.12 | 338 |
68 | 개척 소스 | 그리움 | 2007.04.12 | 302 |
67 | 머드에서 몹 심기 | 그리움 | 2007.04.12 | 287 |
66 | 온라인 리붓 | 그리움 | 2007.04.12 | 287 |
65 | 방전체 공격루틴 #2 | 그리움 | 2007.04.12 | 287 |
64 | 이동하는 몹 | 그리움 | 2007.04.12 | 283 |
63 | 프롬프트 그래프화 #2 | 그리움 | 2007.04.12 | 280 |
62 | 낚시 | 그리움 | 2007.04.12 | 280 |
61 | 운영자명령 "보고" | 그리움 | 2007.04.12 | 280 |
60 | Mordor에 있는 몹 소환 소스 | 그리움 | 2007.04.12 | 277 |
59 | 프롬프트 그래프화 | 그리움 | 2007.04.12 | 271 |
58 | 귀환장소 수정판 | 그리움 | 2007.04.12 | 263 |