added areas and ccoh, fixed some areas to work with crafting fixed some on death issues added server entry/ooc
77 lines
4.1 KiB
Plaintext
77 lines
4.1 KiB
Plaintext
//ColdBlade
|
|
//Core Function
|
|
//Copyright (c) 2002 by Coldblade
|
|
//V2.5.0
|
|
//-------------------------------------------------
|
|
//Jumped to version 2.5.0 because this would be a major core code rewrite.
|
|
//I have decided to separe the orginal three function from the Version 1.0.0
|
|
//into three separe files, one being the Raise/Lower Stats and Skills Include
|
|
//file, the other one would be the Subrace and Templates Include, Then the final
|
|
//file is the core which is this one, this file is to determite which function
|
|
//to call, and it probably will get altered a lots that's why i separed the
|
|
//subrace and templates, and raise/lower stats function/includes from the core
|
|
//to easern the change and make it imho more newbie friendly, to add new subrace
|
|
//or template all the newbie got to do is add it to the bottom of the subrace
|
|
//files, then provide a way for the core to call it and bam his work is done.
|
|
|
|
//when altering my name for relase be sure to change and correct the #includes.
|
|
#include "_cb_subrace"
|
|
|
|
//Template Function
|
|
int template(object cbObject, string cbPCsubrace)
|
|
{
|
|
int ECL = 0;
|
|
if(TestStringAgainstPattern("**AASIMAR**", cbPCsubrace)) ECL = aasimar(cbObject);
|
|
if(TestStringAgainstPattern("**TIEFLING**", cbPCsubrace)) ECL = tiefling(cbObject);
|
|
if(TestStringAgainstPattern("**AIR**", cbPCsubrace)) ECL = air(cbObject);
|
|
if(TestStringAgainstPattern("**EARTH**", cbPCsubrace)) ECL = earth(cbObject);
|
|
if(TestStringAgainstPattern("**WATER**", cbPCsubrace)) ECL = water(cbObject);
|
|
if(TestStringAgainstPattern("**FIRE**", cbPCsubrace)) ECL = fire(cbObject);
|
|
if(TestStringAgainstPattern("**CELESTIAL**", cbPCsubrace)) ECL = celestial(cbObject);
|
|
if(TestStringAgainstPattern("**FIENDISH**", cbPCsubrace)) ECL = fiendish(cbObject);
|
|
if(TestStringAgainstPattern("**HALF-CELESTIAL**", cbPCsubrace)) ECL = halfcelestial(cbObject);
|
|
if((TestStringAgainstPattern("**HALF-FIEND**", cbPCsubrace)) ||
|
|
(TestStringAgainstPattern("**FIEND**", cbPCsubrace))) ECL = halffiend(cbObject);
|
|
if((TestStringAgainstPattern("**HALF-DRAGON**", cbPCsubrace)) ||
|
|
(TestStringAgainstPattern("**DRAGON**", cbPCsubrace))) ECL = halfdragon(cbObject);
|
|
return ECL;
|
|
}
|
|
|
|
int core(object cbObject)
|
|
{
|
|
int cbPCrace = GetRacialType(cbObject);
|
|
string cbPCsubrace = GetStringUpperCase(GetSubRace(cbObject));
|
|
int cbECL = 0;
|
|
switch(cbPCrace)
|
|
{
|
|
case RACIAL_TYPE_HUMAN: break;
|
|
case RACIAL_TYPE_HALFORC: break;
|
|
case RACIAL_TYPE_HALFELF: break;
|
|
case RACIAL_TYPE_HALFLING:
|
|
if(TestStringAgainstPattern("**GHOSTWISE**", cbPCsubrace)) cbECL = ghostwise(cbObject);
|
|
if(TestStringAgainstPattern("**LIGHTFOOT**", cbPCsubrace)) cbECL = lightfoot(cbObject);
|
|
if(TestStringAgainstPattern("**STRONGHEART**", cbPCsubrace)) cbECL = strongheart(cbObject);
|
|
break;
|
|
case RACIAL_TYPE_DWARF:
|
|
if(TestStringAgainstPattern("**GOLD**", cbPCsubrace)) cbECL = gold(cbObject);
|
|
if(TestStringAgainstPattern("**SHIELD**", cbPCsubrace)) cbECL = shield(cbObject);
|
|
if((TestStringAgainstPattern("**GRAY**", cbPCsubrace)) ||
|
|
(TestStringAgainstPattern("**DUERGAR**", cbPCsubrace))) cbECL = gray(cbObject);
|
|
break;
|
|
case RACIAL_TYPE_ELF:
|
|
if((TestStringAgainstPattern("**DROW**", cbPCsubrace)) ||
|
|
(TestStringAgainstPattern("**DARK**", cbPCsubrace))) cbECL = drow(cbObject);
|
|
if(TestStringAgainstPattern("**WILD**", cbPCsubrace)) cbECL = wild(cbObject);
|
|
if(TestStringAgainstPattern("**MOON**", cbPCsubrace)) cbECL = moon(cbObject);
|
|
if(TestStringAgainstPattern("**SUN**", cbPCsubrace)) cbECL = sun(cbObject);
|
|
if(TestStringAgainstPattern("**WOOD**", cbPCsubrace)) cbECL = wood(cbObject);
|
|
break;
|
|
case RACIAL_TYPE_GNOME:
|
|
if(TestStringAgainstPattern("**ROCK**", cbPCsubrace)) cbECL = rock(cbObject);
|
|
if((TestStringAgainstPattern("**DEEP**", cbPCsubrace)) ||
|
|
(TestStringAgainstPattern("**SVIRFNEBLIN**", cbPCsubrace))) cbECL = deep(cbObject);
|
|
break;
|
|
}
|
|
return (cbECL + template(cbObject, cbPCsubrace));
|
|
}
|