diff options
author | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-21 20:31:19 +0000 |
---|---|---|
committer | valaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-11-21 20:31:19 +0000 |
commit | 88edb9b8ba85d40dc47fd259c49e4638a3175348 (patch) | |
tree | 622e6e37aaab07858b19fdf05991c5fcc5aea5f0 /src | |
parent | c8a67180701700f070c4437b5ea2b9e3d9eaa8e2 (diff) | |
download | hercules-88edb9b8ba85d40dc47fd259c49e4638a3175348.tar.gz hercules-88edb9b8ba85d40dc47fd259c49e4638a3175348.tar.bz2 hercules-88edb9b8ba85d40dc47fd259c49e4638a3175348.tar.xz hercules-88edb9b8ba85d40dc47fd259c49e4638a3175348.zip |
Added bonus bClassChange,%; to randomly transform monster into another monster.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@302 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 27 | ||||
-rw-r--r-- | src/map/map.h | 6 | ||||
-rw-r--r-- | src/map/pc.c | 7 |
3 files changed, 37 insertions, 3 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index a83df2ba8..7c2090b6b 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3866,6 +3866,33 @@ static struct Damage battle_calc_pc_weapon_attack( } /* End addition */ + // for azoth weapon [Valaris] + if(src->type == BL_PC && target->type == BL_MOB && sd->classchange) { + if(rand()%10000 < sd->classchange) { + int changeclass[]={ + 1001,1002,1004,1005,1007,1008,1009,1010,1011,1012,1013,1014,1015,1016,1018,1019,1020, + 1021,1023,1024,1025,1026,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1040,1041, + 1042,1044,1045,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1060,1061, + 1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1076,1077,1078,1079,1080,1081,1083, + 1084,1085,1094,1095,1097,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110, + 1111,1113,1114,1116,1117,1118,1119,1121,1122,1123,1124,1125,1126,1127,1128,1129,1130, + 1131,1132,1133,1134,1135,1138,1139,1140,1141,1142,1143,1144,1145,1146,1148,1149,1151, + 1152,1153,1154,1155,1156,1158,1160,1161,1163,1164,1165,1166,1167,1169,1170,1174,1175, + 1176,1177,1178,1179,1180,1182,1183,1184,1185,1188,1189,1191,1192,1193,1194,1195,1196, + 1197,1199,1200,1201,1202,1204,1205,1206,1207,1208,1209,1211,1212,1213,1214,1215,1216, + 1219,1242,1243,1245,1246,1247,1248,1249,1250,1253,1254,1255,1256,1257,1258,1260,1261, + 1263,1264,1265,1266,1267,1269,1270,1271,1273,1274,1275,1276,1277,1278,1280,1281,1282, + 1291,1292,1293,1294,1295,1297,1298,1300,1301,1302,1304,1305,1306,1308,1309,1310,1311, + 1313,1314,1315,1316,1317,1318,1319,1320,1321,1322,1323,1364,1365,1366,1367,1368,1369, + 1370,1371,1372,1374,1375,1376,1377,1378,1379,1380,1381,1382,1383,1384,1385,1386,1387, + 1390,1391,1392,1400,1401,1402,1403,1404,1405,1406,1408,1409,1410,1412,1413,1415,1416, + 1417,1493,1494,1495,1497,1498,1499,1500,1502,1503,1504,1505,1506,1507,1508,1509,1510, + 1511,1512,1513,1514,1515,1516,1517,1519,1520,1582,1584,1585,1586,1587 }; + mob_class_change(((struct mob_data *)target),changeclass); + } + } + + // -- moonsoul (final combination of phys, mag damage for ASC_BREAKER) if(skill_num == ASC_BREAKER) { damage += damage3; diff --git a/src/map/map.h b/src/map/map.h index 1d0e6b900..f54579ea2 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -266,7 +266,9 @@ struct map_session_data { int random_attack_increase_add,random_attack_increase_per; // [Valaris] int perfect_hiding; // [Valaris] int unbreakable; + int classchange; // [Valaris] + int die_counter; short doridori_counter; @@ -578,8 +580,8 @@ enum { SP_SPLASH_RANGE,SP_SPLASH_ADD_RANGE,SP_AUTOSPELL,SP_HP_DRAIN_RATE,SP_SP_DRAIN_RATE, // 1058-1062 SP_SHORT_WEAPON_DAMAGE_RETURN,SP_LONG_WEAPON_DAMAGE_RETURN,SP_WEAPON_COMA_ELE,SP_WEAPON_COMA_RACE, // 1063-1066 SP_ADDEFF2,SP_BREAK_WEAPON_RATE,SP_BREAK_ARMOR_RATE,SP_ADD_STEAL_RATE, // 1067-1070 - SP_MAGIC_DAMAGE_RETURN,SP_RANDOM_ATTACK_INCREASE,SP_ALL_STATS,SP_AGI_VIT,SP_AGI_DEX_STR,SP_PERFECT_HIDE, // 1071-1077 - SP_DISGUISE, // 1077 + SP_MAGIC_DAMAGE_RETURN,SP_RANDOM_ATTACK_INCREASE,SP_ALL_STATS,SP_AGI_VIT,SP_AGI_DEX_STR,SP_PERFECT_HIDE, // 1071-1076 + SP_DISGUISE,SP_CLASSCHANGE, // 1077-1078 SP_RESTART_FULL_RECORVER=2000,SP_NO_CASTCANCEL,SP_NO_SIZEFIX,SP_NO_MAGIC_DAMAGE,SP_NO_WEAPON_DAMAGE,SP_NO_GEMSTONE, // 2000-2005 SP_NO_CASTCANCEL2,SP_INFINITE_ENDURE,SP_UNBREAKABLE_WEAPON,SP_UNBREAKABLE_ARMOR // 2006-2009 diff --git a/src/map/pc.c b/src/map/pc.c index 799fc2f59..b2fb1e120 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -2436,6 +2436,11 @@ int pc_bonus(struct map_session_data *sd,int type,int val) sd->unbreakable += val; } break; + case SP_CLASSCHANGE: // [Valaris] + if(sd->state.lr_flag !=2){ + sd->classchange=val; + } + break; default: if(battle_config.error_log) printf("pc_bonus: unknown type %d %d !\n",type,val); @@ -2620,8 +2625,8 @@ int pc_bonus2(struct map_session_data *sd,int type,int type2,int val) if(sd->state.lr_flag !=2){ sd->random_attack_increase_add = type2; sd->random_attack_increase_per += val; + } break; - } // end addition default: if(battle_config.error_log) printf("pc_bonus2: unknown type %d %d %d!\n",type,type2,val); |