710 lines
21 KiB
Plaintext
710 lines
21 KiB
Plaintext
//ColdBlade
|
|
//Subrace & Templates 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 this file being the Subrace and Templates Include
|
|
//Then the final one would be the Core which would worry about how to figure out
|
|
//which subrace the player is. This one is just for seting up the stat bonus
|
|
//and pentality plus other speical effects like the Drow's 11+Level Spell Resistance
|
|
//All subrace and template return that template or subrace ECL as a Integer.
|
|
//For certain speical effects that depends on day/night time cycle write it in
|
|
//a function
|
|
|
|
//when altering my name for relase be sure to change and correct the #includes.
|
|
#include "_cb_stat"
|
|
|
|
//--------------------------------------------
|
|
//Miscellanous Function To Support Subraces
|
|
//--------------------------------------------
|
|
|
|
int hitdicebonus(object cbObject)
|
|
{
|
|
int cbOld1 = GetLocalInt(cbObject, "CB_OLD1");
|
|
int cbOld2 = GetLocalInt(cbObject, "CB_OLD2");
|
|
int cbOld3 = GetLocalInt(cbObject, "CB_OLD3");
|
|
int cbNew1 = d2(GetLevelByPosition(1, cbObject)); //:: I'm not going to encourage this stupidity.
|
|
int cbNew2 = d2(GetLevelByPosition(2, cbObject));
|
|
int cbNew3 = d2(GetLevelByPosition(3, cbObject));
|
|
int cbClass1 = GetClassByPosition(1, cbObject);
|
|
int cbClass2 = GetClassByPosition(2, cbObject);
|
|
int cbClass3 = GetClassByPosition(3, cbObject);
|
|
|
|
//Due to the random nature of the randomizer and dice roll i'm going to setup
|
|
//a while that won't quit untill the new hitdice bonus is higher than the old
|
|
//by at minum 1 hp. Also check to make sure there's atleast one level in that
|
|
//class slot, if its zero then don't do it cos well it would just get stuck
|
|
//in a infine loop, not good!
|
|
if (!GetIsDM(cbObject))
|
|
{
|
|
if(GetLevelByPosition(1, cbObject) != 0)
|
|
{
|
|
while(cbOld1 > cbNew1)
|
|
{
|
|
cbNew1 = d2(GetLevelByPosition(1, cbObject));
|
|
}
|
|
}
|
|
if(GetLevelByPosition(2, cbObject) != 0)
|
|
{
|
|
while(cbOld2 > cbNew2)
|
|
{
|
|
cbNew2 = d2(GetLevelByPosition(2, cbObject));
|
|
}
|
|
}
|
|
if(GetLevelByPosition(3, cbObject) != 0)
|
|
{
|
|
while(cbOld3 > cbNew3)
|
|
{
|
|
cbNew3 = d2(GetLevelByPosition(3, cbObject));
|
|
}
|
|
}
|
|
//now if the class in any of the three avaiable slot is a barbarn then zero
|
|
//that slot out so the barbarn won't get the hp bonus but all the other class will.
|
|
if(cbClass1 == CLASS_TYPE_BARBARIAN) cbNew1 = 0;
|
|
if(cbClass2 == CLASS_TYPE_BARBARIAN || CLASS_TYPE_INVALID) cbNew2 = 0;
|
|
if(cbClass3 == CLASS_TYPE_BARBARIAN || CLASS_TYPE_INVALID) cbNew3 = 0;
|
|
}
|
|
//now to set the local int for the next levelup and also set the int for the bonus hp.
|
|
SetLocalInt(cbObject, "CB_OLD1", cbNew1);
|
|
SetLocalInt(cbObject, "CB_OLD2", cbNew2);
|
|
SetLocalInt(cbObject, "CB_OLD3", cbNew3);
|
|
return (cbNew1 + cbNew2 + cbNew3);
|
|
}
|
|
|
|
|
|
//------------------------------------
|
|
//Subrace
|
|
//------------------------------------
|
|
|
|
|
|
//Gold Dwarves.
|
|
//+2 Con, -2 Dex
|
|
//+1 Racial Bonus on attack verus Aberrations. (replace attack bonus verus orc/goblinoids)
|
|
int gold(object cbObject)
|
|
{
|
|
stat(6, 2, cbObject);
|
|
stat(2, 2, cbObject, FALSE);
|
|
//ditto how to replace the +1 racial bonus with the one verus aberration as stated in the description above.
|
|
return 0;
|
|
}
|
|
|
|
//Gray(Duergar) Dwarves
|
|
//+2 Con, -4 Cha
|
|
//Immune to Paralysis, Phantasms, Magic or Alchemical Poisons (not normal Poison)
|
|
//+4 racial bonus on move silently checks
|
|
//+1 to listen and spot checks.
|
|
//Light Sensitivity, upon dawn or daytime the Duergar Suffers a -2 Pentality on
|
|
// Attack Rolls, Saves, and checks (aka Skills).
|
|
//ECL +2
|
|
int gray(object cbObject)
|
|
{
|
|
stat(2, 6, cbObject, FALSE);
|
|
immunity(22, cbObject);
|
|
spellimmunity(151, cbObject);
|
|
spellimmunity(153, cbObject);
|
|
skills(4, 9, cbObject);
|
|
skills(1, 7, cbObject);
|
|
skills(1, 18, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
CreateItemOnObject("duergarspelllike",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Duergar Spell-Like Ability, Do not lose it!");
|
|
SetLocalInt(cbObject, "CB_ITEM", 1);
|
|
}*/
|
|
return 2;
|
|
}
|
|
|
|
//Shield Dwarves
|
|
//Standard Dwarves
|
|
int shield(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
|
|
//Drow
|
|
//+2 Dex, -2 Con, +2 Int, +2 Cha
|
|
//Darkvision (replaces Lowlight Vision)
|
|
//Light Blindness, Drow is blinded onice a day for one round, -1 pentality to
|
|
// attacks, saves, and skills.
|
|
//spell resistance of 11+Level
|
|
//+2 Racial Bonus to will saves verus spells.
|
|
//ECL +2
|
|
int drow(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
stat(2, 6, cbObject);
|
|
stat(2, 4, cbObject);
|
|
spellresistance(cbPClevel, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
CreateItemOnObject("drowspelllikeabi",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Drow Spell-Like Ability, Do not lose it!");
|
|
SetLocalInt(cbObject, "CB_ITEM", 1);
|
|
} */
|
|
return 2;
|
|
}
|
|
|
|
//Moon Elves
|
|
//standard elves.
|
|
int moon(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
//Sun Elves
|
|
//+2 Int, -2 Con
|
|
int sun(object cbObject)
|
|
{
|
|
stat(2, 4, cbObject);
|
|
stat(2, 2, cbObject, FALSE);
|
|
return 0;
|
|
}
|
|
|
|
//Wild Elves
|
|
//+2 Dex, -2 Int
|
|
int wild(object cbObject)
|
|
{
|
|
stat(2, 4, cbObject, FALSE);
|
|
return 0;
|
|
}
|
|
|
|
//Wood Elves
|
|
//+2 Str, +2 Dex, -2 Con, -2 Int, -2 Cha
|
|
int wood(object cbObject)
|
|
{
|
|
stat(2, 1, cbObject);
|
|
stat(2, 4, cbObject, FALSE);
|
|
stat(2, 6, cbObject, FALSE);
|
|
return 0;
|
|
}
|
|
|
|
|
|
//Deep(Svirfneblin) Gnome
|
|
//-2 Str, +2 Dex, +2 Wis, -4 Cha
|
|
//Darkvision
|
|
//Stonecunning
|
|
//Spellresistance 11+Level
|
|
//+4 dodge bonus verus all creatures.
|
|
//+2 racial bonus on all saving throws
|
|
//+2 racial bonus on hide check, which improves to +4 at night/dusk.
|
|
//ECL +3
|
|
int deep(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
spellresistance(cbPClevel, cbObject);
|
|
stat(2, 2, cbObject);
|
|
stat(2, 5, cbObject);
|
|
stat(2, 3, cbObject, FALSE);
|
|
stat(4, 6, cbObject, FALSE);
|
|
savingthrow(4, 2, 21, cbObject);
|
|
ac(4, 3, cbObject);
|
|
skills(4, 6, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
CreateItemOnObject("svirfneblinspell",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Svirfneblin Spell-Like Ability, Do not lose it!");
|
|
SetLocalInt(cbObject, "CB_ITEM", 1);
|
|
} */
|
|
return 3;
|
|
}
|
|
|
|
//Rock Gnomes
|
|
//Standard Gnomes
|
|
int rock(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
|
|
//Ghostwise Halfling
|
|
//Speak without Sound
|
|
//Does not recieve +1 saving bonus to saving throws.
|
|
int ghostwise(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
//Lightfoot Halfling
|
|
//standard halfling
|
|
int lightfoot(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
//Strongheart Halfling
|
|
//Recieve one extra feat at 1st level
|
|
//does not recieve +1 saving bonus to saving throws.
|
|
int strongheart(object cbObject)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
|
|
//------------------------------------------------
|
|
//Templates
|
|
//------------------------------------------------
|
|
|
|
|
|
//Aasimar
|
|
//+2 Wis, +2 Cha
|
|
//Acid, Cold, Electricity resistance 5/-
|
|
//+2 racial bonus to listen and spot check
|
|
//darkvision
|
|
//outsider
|
|
//ECL +1
|
|
int aasimar(object cbObject)
|
|
{
|
|
stat(2, 5, cbObject);
|
|
stat(2, 6, cbObject);
|
|
damageresistance(1, 5, 0, cbObject);
|
|
damageresistance(3, 5, 0, cbObject);
|
|
damageresistance(5, 5, 0, cbObject);
|
|
skills(2, 7, cbObject);
|
|
skills(2, 18, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
CreateItemOnObject("aasimarspelllike",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Aasimar Spell-Like Ability, Do not lose it!");
|
|
SetLocalInt(cbObject, "CB_ITEM", 1);
|
|
}*/
|
|
return 1;
|
|
}
|
|
|
|
//Tiefling
|
|
//+2 Dex, +2 Int, -2 Cha
|
|
//Fire, Cold, Electricity resistance 5/-
|
|
//+2 racial bonus on bluff and hide check
|
|
//outsider
|
|
//darkvision
|
|
//ECL +1
|
|
int tiefling(object cbObject)
|
|
{
|
|
stat(2, 2, cbObject);
|
|
stat(2, 4, cbObject);
|
|
stat(2, 6, cbObject, FALSE);
|
|
damageresistance(6, 5, 0, cbObject);
|
|
damageresistance(3, 5, 0, cbObject);
|
|
damageresistance(5, 5, 0, cbObject);
|
|
skills(2, 6, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
CreateItemOnObject("tieflingspelllik",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Tiefling Spell-Like Ability, Do not lose it!");
|
|
SetLocalInt(cbObject, "CB_ITEM", 1);
|
|
} */
|
|
return 1;
|
|
}
|
|
|
|
//Air Genasi
|
|
//+2 Dex, +2 Int, -2 Wis, -2 Cha
|
|
//darkvision
|
|
//outsider
|
|
//+1 saving throw to sonic effects, inreases every 5 level.
|
|
//ECL +1
|
|
int air(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
stat(2, 2, cbObject);
|
|
stat(2, 4, cbObject);
|
|
stat(2, 5, cbObject, FALSE);
|
|
stat(2, 6, cbObject, FALSE);
|
|
savingthrow(4, (1+(cbPClevel/5)), 18, cbObject, 1);
|
|
return 1;
|
|
}
|
|
|
|
//Earth Genasi
|
|
//+2 Str, +2 Con, -2 Wis, -2 Cha
|
|
//darkvision
|
|
//outsider
|
|
//+1 saving throw to acid effect, increase every 5 level.
|
|
//ECL +1
|
|
int earth(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
stat(2, 1, cbObject);
|
|
stat(2, 3, cbObject);
|
|
stat(2, 5, cbObject, FALSE);
|
|
stat(2, 6, cbObject, FALSE);
|
|
savingthrow(4, (1+(cbPClevel/5)), 1, cbObject, 1);
|
|
return 1;
|
|
}
|
|
|
|
//Fire Genasi
|
|
//+2 Int, -2 Cha
|
|
//darkvision
|
|
//outsider
|
|
//+1 saving throw to fire effect, increase every 5 level.
|
|
//ECL +1
|
|
int fire(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
stat(2, 4, cbObject);
|
|
stat(2, 6, cbObject, FALSE);
|
|
savingthrow(4, (1+(cbPClevel/5)), 11, cbObject, 1);
|
|
return 1;
|
|
}
|
|
|
|
//Water Genasi
|
|
//+2 Con, -2 Cha
|
|
//darkvision
|
|
//outsider
|
|
//+1 saving throw to cold effect, increase every 5 level.
|
|
//ECL +1
|
|
int water(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
stat(2, 3, cbObject);
|
|
stat(2, 6, cbObject, FALSE);
|
|
savingthrow(4, (1+(cbPClevel/5)), 4, cbObject, 1);
|
|
return 1;
|
|
}
|
|
|
|
//Celestial
|
|
//Darkvision
|
|
//Smite Evil
|
|
//Acid, Cold, Electricity resistance
|
|
//damage reduction
|
|
//spell resistance equal to double player level, caps at 25
|
|
//Level, A/C/E, DR, ECL
|
|
//1-3, 5/-, -, -
|
|
//4-7, 10/-, 5/+1, 1
|
|
//8-11, 15/-, 5/+2, 2
|
|
//12+, 20/-, 10/+3, 3
|
|
int celestial(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
int cbSR = 2 * cbPClevel;
|
|
if(cbSR == 25)
|
|
{
|
|
cbSR = 25;
|
|
}
|
|
spellresistance(cbSR, cbObject);
|
|
if((cbPClevel >= 1) && (cbPClevel <= 3))
|
|
{
|
|
damageresistance(1, 5, 0, cbObject);
|
|
damageresistance(3, 5, 0, cbObject);
|
|
damageresistance(5, 5, 0, cbObject);
|
|
return 0;
|
|
}
|
|
if((cbPClevel >= 4) && (cbPClevel <= 7))
|
|
{
|
|
damageresistance(1, 10, 0, cbObject);
|
|
damageresistance(3, 10, 0, cbObject);
|
|
damageresistance(5, 10, 0, cbObject);
|
|
damagereduction(5, 3, 0, cbObject);
|
|
return 1;
|
|
}
|
|
if((cbPClevel >= 8) && (cbPClevel <= 11))
|
|
{
|
|
damageresistance(1, 15, 0, cbObject);
|
|
damageresistance(3, 15, 0, cbObject);
|
|
damageresistance(5, 15, 0, cbObject);
|
|
damagereduction(5, 4, 0, cbObject);
|
|
return 2;
|
|
}
|
|
if(cbPClevel <= 12)
|
|
{
|
|
damageresistance(1, 20, 0, cbObject);
|
|
damageresistance(3, 20, 0, cbObject);
|
|
damageresistance(5, 20, 0, cbObject);
|
|
damagereduction(10, 5, 0, cbObject);
|
|
return 3;
|
|
}
|
|
return 0; //should never get here
|
|
}
|
|
|
|
//Fiendish
|
|
//Darkvision
|
|
//Smite Good
|
|
//Fire, Cold resistance
|
|
//damage reduction
|
|
//spell resistance equal to double player level, caps at 25
|
|
//Level, F/C, DR, ECL
|
|
//1-3, 5/-, -, -
|
|
//4-7, 10/-, 5/+1, 1
|
|
//8-11, 15/-, 5/+2, 2
|
|
//12+, 20/-, 10/+3, 3
|
|
int fiendish(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
int cbSR = 2 * cbPClevel;
|
|
if(cbSR == 25)
|
|
{
|
|
cbSR = 25;
|
|
}
|
|
spellresistance(cbSR, cbObject);
|
|
if((cbPClevel >= 1) && (cbPClevel <= 3))
|
|
{
|
|
damageresistance(6, 5, 0, cbObject);
|
|
damageresistance(3, 5, 0, cbObject);
|
|
return 0;
|
|
}
|
|
if((cbPClevel >= 4) && (cbPClevel <= 7))
|
|
{
|
|
damageresistance(6, 10, 0, cbObject);
|
|
damageresistance(3, 10, 0, cbObject);
|
|
damagereduction(5, 3, 0, cbObject);
|
|
return 1;
|
|
}
|
|
if((cbPClevel >= 8) && (cbPClevel <= 11))
|
|
{
|
|
damageresistance(6, 15, 0, cbObject);
|
|
damageresistance(3, 15, 0, cbObject);
|
|
damagereduction(5, 4, 0, cbObject);
|
|
return 2;
|
|
}
|
|
if(cbPClevel <= 12)
|
|
{
|
|
damageresistance(6, 20, 0, cbObject);
|
|
damageresistance(3, 20, 0, cbObject);
|
|
damagereduction(10, 5, 0, cbObject);
|
|
return 3;
|
|
}
|
|
return 0; //should never get here
|
|
}
|
|
|
|
//Half-Celestial
|
|
//75% chance of doubling the character speed and get a wing attached.
|
|
//Ac increase +1
|
|
//+4 Str, +2 Dex, +4 Con, +2 Int, +4 Wis, +4 Cha
|
|
//immune to acid, cold, disease, electricity
|
|
//+4 racial bonus to fort save verus poison.
|
|
//ECL +4
|
|
int halfcelestial(object cbObject)
|
|
{
|
|
stat(4, 1, cbObject);
|
|
stat(2, 2, cbObject);
|
|
stat(4, 3, cbObject);
|
|
stat(2, 4, cbObject);
|
|
stat(4, 5, cbObject);
|
|
stat(4, 6, cbObject);
|
|
ac(1, 2, cbObject);
|
|
savingthrow(1, 4, 16, cbObject);
|
|
int cbDice = d4(1);
|
|
if(cbDice = 1)
|
|
{
|
|
speed(200, cbObject);
|
|
}
|
|
damageimmunity(100, 1, cbObject, 1);
|
|
damageimmunity(100, 3, cbObject, 1);
|
|
damageimmunity(100, 5, cbObject, 1);
|
|
immunity(14, cbObject);
|
|
return 4;
|
|
}
|
|
|
|
//Half-Fiend
|
|
//Ac increase +1
|
|
//50% to multiple speed by 1.5 and get a wing attached
|
|
//darkvision
|
|
//+4 Str, +4 Dex, +2 Con, +4 Int, +0 Wis, +2 Cha
|
|
//immune to poison.
|
|
//acid cold electricity and fire resistance of 20/-
|
|
//ECL +4
|
|
int halffiend(object cbObject)
|
|
{
|
|
stat(4, 1, cbObject);
|
|
stat(4, 2, cbObject);
|
|
stat(4, 3, cbObject);
|
|
stat(4, 4, cbObject);
|
|
stat(4, 6, cbObject);
|
|
ac(1, 2, cbObject);
|
|
immunity(23, cbObject);
|
|
damageresistance(1, 20, 0, cbObject);
|
|
damageresistance(3, 20, 0, cbObject);
|
|
damageresistance(6, 20, 0, cbObject);
|
|
damageresistance(5, 20, 0, cbObject);
|
|
int cbDice = d4(1);
|
|
if(cbDice >= 2)
|
|
{
|
|
speed(150, cbObject);
|
|
}
|
|
return 4;
|
|
}
|
|
|
|
//Half-Dragon
|
|
//Hitdice Imcreases one dice type, to a max of 1d12
|
|
//Ac increase +4 Natural
|
|
//Type of dragon you are Depends on your aligment.
|
|
//+8 Str, +0 Dex, +2 Con, +2 Int, +0 Wis, +2 Cha
|
|
//Darkvision
|
|
//Immune sleep, paralysis.
|
|
|
|
//It checks your alignment so on then randomly select the dragon in that catalogry
|
|
//Chaotic Evil: Black, Red, White
|
|
//Lawful Evil: Blue, Green
|
|
//Chaotic Good: Brass, Copper
|
|
//Lawful Good: Bronze, Gold, Silver
|
|
|
|
//Then the immunity is set depending on your dragon type.
|
|
//Acid: Black, Green, Copper
|
|
//Cold: White, Silver
|
|
//Fire: Red, Brass, Gold
|
|
//Electricity: Blue, Bronze
|
|
|
|
//Then depending on your type of dragon it choice your dragon breath (cone only)
|
|
//Fire: Red, Brass, Gold
|
|
//Acid: Black, Copper
|
|
//Cold: White, Silver
|
|
//Electricity: Blue, Bronze
|
|
//Gas: Green
|
|
//ECL +5
|
|
int halfdragon(object cbObject)
|
|
{
|
|
int cbPClevel = GetLevelByPosition(1, cbObject) + GetLevelByPosition(2, cbObject) + GetLevelByPosition(3, cbObject);
|
|
int cbGoodEvil = GetAlignmentGoodEvil(cbObject);
|
|
int cbLawChaos = GetAlignmentLawChaos(cbObject);
|
|
int cbType1 = d2(1);
|
|
int cbType2 = d3(1);
|
|
ac(4, 4, cbObject);
|
|
stat(8, 1, cbObject);
|
|
stat(2, 3, cbObject);
|
|
stat(2, 4, cbObject);
|
|
stat(2, 6, cbObject);
|
|
immunity(27, cbObject);
|
|
immunity(22, cbObject);
|
|
//To simplefye the code a bit i set so that the hitdice bonus of the half-dragon update
|
|
//when the player reenter or dies and get resurrected.
|
|
hitpoint(hitdicebonus(cbObject), cbObject);
|
|
//Here we check your alignment and setup which dragon u get :)
|
|
//it checks only onice per game so if ur aligment shift u won't suddenly
|
|
//get a gold or say a red dragon for example it gives u one dragon type
|
|
//then it sticks with it for the rest of the game.
|
|
if(GetLocalInt(cbObject, "CB_CHECK") == 0)
|
|
{
|
|
if(cbGoodEvil == ALIGNMENT_EVIL && cbLawChaos == ALIGNMENT_LAWFUL)
|
|
{
|
|
switch(cbType1)
|
|
{
|
|
case 1: SetLocalInt(cbObject, "CB_DRAGON", 1); break; //Blue Half-Dragon
|
|
default: SetLocalInt(cbObject, "CB_DRAGON", 2); break; //Green Half-Dragon
|
|
}
|
|
}
|
|
if(cbGoodEvil == ALIGNMENT_EVIL && cbLawChaos == ALIGNMENT_CHAOTIC)
|
|
{
|
|
switch(cbType2)
|
|
{
|
|
case 1: SetLocalInt(cbObject, "CB_DRAGON", 3); break; //Black Half-Dragon
|
|
case 2: SetLocalInt(cbObject, "CB_DRAGON", 4); break; //Red Half-Dragon
|
|
default: SetLocalInt(cbObject, "CB_DRAGON", 5); break; //White Half-Dragon
|
|
}
|
|
}
|
|
if(cbGoodEvil == ALIGNMENT_GOOD && cbLawChaos == ALIGNMENT_LAWFUL)
|
|
{
|
|
switch(cbType1)
|
|
{
|
|
case 1: SetLocalInt(cbObject, "CB_DRAGON", 6); break; //Gold Half-Dragon
|
|
case 2: SetLocalInt(cbObject, "CB_DRAGON", 7); break; //Silver Half-Dragon
|
|
default: SetLocalInt(cbObject, "CB_DRAGON", 8); break; //Bronze Half-Dragon
|
|
}
|
|
}
|
|
if(cbGoodEvil == ALIGNMENT_GOOD && cbLawChaos == ALIGNMENT_CHAOTIC)
|
|
{
|
|
switch(cbType2)
|
|
{
|
|
case 1: SetLocalInt(cbObject, "CB_DRAGON", 9); break; //Brass Half-Dragon
|
|
default: SetLocalInt(cbObject, "CB_DRAGON", 10); break; //Copper Half-Dragon
|
|
}
|
|
}
|
|
SetLocalInt(cbObject, "CB_CHECK", 1);
|
|
}
|
|
switch(GetLocalInt(cbObject, "CB_DRAGON"))
|
|
{
|
|
case 1: //Blue Half-Dragon
|
|
damageimmunity(100, 5, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Blue Half-Dragon!");
|
|
CreateItemOnObject("bluehalfdragonbr",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Blue Half-Dragon Breathe Ability, Do not lose it!");
|
|
}*/
|
|
break;
|
|
case 2: //Green Half-Dragon
|
|
damageimmunity(100, 1, cbObject);
|
|
/* if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Green Half-Dragon!");
|
|
CreateItemOnObject("Greenhalfdragonb",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Green Half-Dragon Breathe Ability, Do not lose it!");
|
|
}*/
|
|
break;
|
|
case 3: //Black Half-Dragon
|
|
damageimmunity(100, 1, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Black Half-Dragon!");
|
|
CreateItemOnObject("blackhalfdragonb",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Black Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
case 4: //Red Half-Dragon
|
|
damageimmunity(100, 6, cbObject);
|
|
/* if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Red Half-Dragon!");
|
|
CreateItemOnObject("Redhalfdragonbre",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Red Half-Dragon Breathe Ability, Do not lose it!");
|
|
}*/
|
|
break;
|
|
case 5: //White Half-Dragon
|
|
damageimmunity(100, 3, cbObject);
|
|
/* if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a White Half-Dragon!");
|
|
CreateItemOnObject("whitehalfdragonb",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the White Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
case 6: //Gold Half-Dragon
|
|
damageimmunity(100, 6, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Gold Half-Dragon!");
|
|
CreateItemOnObject("goldhalfdragonbr",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Gold Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
case 7: //Silver Half-Dragon
|
|
damageimmunity(100, 3, cbObject);
|
|
/* if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Silver Half-Dragon!");
|
|
CreateItemOnObject("silverhalfdragon",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Silver Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
case 8: //Bronze Half-Dragon
|
|
damageimmunity(100, 5, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Bronze Half-Dragon!");
|
|
CreateItemOnObject("bronzehalfdragon",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Bronze Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
case 9: //Brass Half-Dragon
|
|
damageimmunity(100, 6, cbObject);
|
|
/*if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Brass Half-Dragon!");
|
|
CreateItemOnObject("brasshalfdragonb",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Brass Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
default: //Copper Half-Dragon
|
|
damageimmunity(100, 1, cbObject);
|
|
/* if(GetLocalInt(cbObject, "CB_ITEM") != 1)
|
|
{
|
|
SendMessageToPC(cbObject,"You are a Copper Half-Dragon!");
|
|
CreateItemOnObject("copperhalfdragon",cbObject);
|
|
SendMessageToPC(cbObject,"You have the object for the Copper Half-Dragon Breathe Ability, Do not lose it!");
|
|
} */
|
|
break;
|
|
}
|
|
return 5;
|
|
}
|
|
|