|
楼主 |
发表于 2009-10-14 15:18
|
显示全部楼层
// Step 2: Choose a Race (chapter 2)
type
TRace = (Human, Elf, HalfElf, Gnome, Halfling, Dwarf); //人类、精灵、半精灵、侏儒、半身人、矮人
TRaces = set of TRace;
TAbilityRange = record min, max: byte end;
TSex = (Male, Female);
TDice = record //骰子
count, faces: byte;
end;
THeightAndWeight = record
Base: array[TSex] of byte;
Dice: TDice;
end;
TAge = record
Base: byte;
Dice: TDice;
Ages: array[1..3] of word;
Max: TDice;
end;
const
RacialAbilityRequirements: array[TRace, TAbility] of TAbilityRange = (
{ Strength Dexterity Constitution Intelligence Wisdom Charisma }
{ Human }((min: 3; max: 18), (min: 3; max: 18), (min: 3; max: 18), (min: 3; max: 18), (min: 3; max: 18), (min: 3; max: 18)),
{ Elf }((min: 3; max: 18), (min: 6; max: 18), (min: 7; max: 18), (min: 8; max: 18), (min: 3; max: 18), (min: 8; max: 18)),
{ Half-Elf }((min: 3; max: 18), (min: 6; max: 18), (min: 6; max: 18), (min: 4; max: 18), (min: 3; max: 18), (min: 3; max: 18)),
{ Gnome }((min: 6; max: 18), (min: 3; max: 18), (min: 8; max: 18), (min: 6; max: 18), (min: 3; max: 18), (min: 3; max: 18)),
{ Halfling }((min: 7; max: 18), (min: 7; max: 18), (min: 10; max: 18), (min: 6; max: 18), (min: 3; max: 17), (min: 3; max: 18)),
{ Dwarf }((min: 8; max: 18), (min: 3; max: 17), (min: 11; max: 18), (min: 3; max: 18), (min: 3; max: 18), (min: 3; max: 17))
);
RacialAbilityAdjustements: array[TRace, TAbility] of ShortInt = ( //種族屬性調整值
{ STR DEX CON INT WIS CHA }
{ Human }(0, 0, 0, 0, 0, 0),
{ Elf }(0, +1, -1, 0, 0, 0),
{ HalfElf }(0, 0, 0, 0, 0, 0),
{ Gnome }(0, 0, 0, +1, -1, 0),
{ Halfling }(-1, +1, 0, 0, 0, 0),
{ Dwarf }(0, 0, +1, 0, 0, -1)
);
AverageHeight: array[TRace] of THeightAndWeight = (// Inches
{ Human }(Base: (60, 59); dice: (count: 2; faces: 10)),
{ Elf }(Base: (55, 50); dice: (count: 1; faces: 10)),
{ HalfElf }(Base: (60, 58); dice: (count: 2; faces: 6)),
{ Gnome }(Base: (38, 36); dice: (count: 1; faces: 6)),
{ Halfling }(Base: (32, 30); dice: (count: 2; faces: 8)),
{ Dwarf }(Base: (43, 41); dice: (count: 1; faces: 10))
);
AverageWeight: array[TRace] of THeightAndWeight = (// Pounds
{ Human }(Base: (140, 100); dice: (count: 6; faces: 10)),
{ Elf }(Base: (90, 70); dice: (count: 3; faces: 10)),
{ HalfElf }(Base: (110, 85); dice: (count: 3; faces: 12)),
{ Gnome }(Base: (72, 68); dice: (count: 5; faces: 4)),
{ Halfling }(Base: (52, 48); dice: (count: 5; faces: 4)),
{ Dwarf }(Base: (130, 105); dice: (count: 4; faces: 10))
);
Ages: array[TRace] of TAge = (
{ Human }(base: (15); dice: (count: 1; faces: 4); ages: (45, 60, 90); max: (count: 2; faces: 20)),
{ Elf }(base: (100); dice: (count: 5; faces: 6); ages: (175, 233, 350); max: (count: 4; faces: 100)),
{ HalfElf }(base: (15); dice: (count: 1; faces: 6); ages: (62, 83, 125); max: (count: 3; faces: 20)),
{ Gnome }(base: (60); dice: (count: 3; faces: 12); ages: (100, 133, 200); max: (count: 3; faces: 100)),
{ Hlafling }(base: (20); dice: (count: 3; faces: 4); ages: (50, 67, 100); max: (count: 1; faces: 100)),
{ Dwarf }(base: (40); dice: (count: 5; faces: 6); ages: (125, 167, 250); max: (count: 2; faces: 100))
);
AgingEffects: array[TAbility, 1..3] of shortint = (
{ Strength }(-1, -2, -1),
{ Dexterity }(0, -2, -1),
{ Constitution }(-1, -1, -1),
{ Intelligence }(+1, 0, +1),
{ Wisdom }(+1, +1, +1),
{ Charisma }(0, 0, 0)
);
// Step 3: Select a Class (chapter 3)
type
TClass = (Fighter, Ranger, Paladin, Mage, Cleric, Druid, Thief, Bard);//战士、游侠、圣武士、法师、牧师、德鲁伊、盗贼、呤游诗人
TClasses = set of TClass;
TSchoolOfMagic = ( //魔法学派
generic,
Abjuration, //防护系
Alteration, //改变系
Conjuration,//咒法系
Enchantment,//附魔系
Divination, //预言系
Illusion, //幻术系
Invocation, //塑能系
Necromancy //死灵系
);
TWizardRequirements = record
Races: TRaces;
Ability: TAbility;
Score: byte;
end;
TThievingSkill = ( //盗贼技能
tsPickPockets, //扒竊
tsOpenLocks, //开锁
tsFindRemoveTraps, //找到并移除陷阱
tsMoveSilently, //潛行
tsHideInShadows,
tsDetectNoise,
tsClimbWalls,
tsReadLanguages
);
TThievingSkills = array[TThievingSkill] of byte;
TThievingSkillDexterityAdjustement = record //盗贼技能敏捷修正
score: byte;
bonus: array[tsPickPockets..tsMoveSilently] of shortint;
end;
IsBard = boolean;
const
Warrior = [Fighter, Ranger, Paladin]; //武士:有3个不同的分支职业:战士,圣武士,游侠。全都接受过良好的武器训练
Wizard = [Mage];
Priest = [Cleric, Druid];
Rogue = [Thief, Bard];
RaceClasses: array[TRace] of TClasses = (
{ Human }[Fighter, Paladin, Ranger, Mage, Cleric, Druid, Thief, Bard],
{ Elf }[Fighter, Ranger, Mage, Cleric, Thief],
{ HalfElf }[Fighter, Ranger, Mage, Cleric, Druid, Thief, Bard],
{ Gnome }[Fighter, Mage, Cleric, Thief],
{ Halfling }[Fighter, Cleric, Thief],
{ Dwarf }[Fighter, Cleric, Thief]
);
DualClasses: array[TRace, TClass] of TClasses = (
{Fighter,Ranger,Paladin,Mage,Cleric, Druid, Thief, Bard }
{ Human }([], [], [], [], [], [], [], []),
{ Elf }([Thief, Mage], [], [], [{Fighter,}Thief], [], [], [{Fighter,Mage}], []),
{ HalfElf }(// de plus, il peut 阾re tri-class?MAGE !
{Fighter }[Thief, Cleric, Druid, Mage],
{Ranger }[Cleric],
{Paladin }[],
{Mage }[{Fighter,}Thief, Cleric],
{Cleric }[{Fighter,Ranger,Mage}],
{Druid }[{Fighter}],
{Thief }[{Fighter,Mage}],
{Bard }[]
),
{ Gnome }([Thief, Cleric, Mage], [], [], [{Fighter,Cleric}], [{Fighter,Mage,}Thief], [], [{Fighter,Mage,Cleric}], []),
{ Halfling }([Thief], [], [], [], [], [], [{Fighter}], []),
{ Dward }([Thief, Cleric], [], [], [], [{Fighter}], [], [{Fighter}], [])
);
ClassAbilityMinimums: array[TClass, TAbility] of byte = (
{ STR DEX CON INT WIS CHA }
{ Fighter }(9, 0, 0, 0, 0, 0),
{ Ranger }(13, 13, 14, 0, 14, 0),
{ Paladin }(12, 0, 9, 0, 13, 17),
{ Mage }(0, 0, 0, 9, 0, 0),
{ Cleric }(0, 0, 0, 0, 9, 0),
{ Druid }(0, 0, 0, 0, 12, 15),
{ Thief }(0, 9, 0, 0, 0, 0),
{ Bard }(0, 0, 0, 13, 0, 15)
);
WizardRequirements: array[TSchoolOfMagic] of TWizardRequirements = (
{ generic }(Races: [Human, Elf, HalfElf]; Ability: abIntelligence; score: 9), // same as above
{ Abjuration }(Races: [Human]; Ability: abWisdom; score: 15),
{ Alteration }(Races: [Human]; Ability: abDexterity; score: 15),
{ Conjuration }(Races: [Human, HalfElf]; Ability: abConstitution; score: 15),
{ Enchantment }(Races: [Human, Elf, HalfElf]; Ability: abCharisma; score: 16),
{ Divination }(Races: [Human, Elf, HalfElf]; Ability: abWisdom; score: 16),
{ Illusion }(Races: [Human, Gnome]; Ability: abDexterity; score: 16),
{ Invocation }(Races: [Human]; Ability: abConstitution; score: 16),
{ Necromancy }(Races: [Human]; Ability: abWisdom; score: 16)
);
ThievingSkillBaseScores: array[TThievingSkill, IsBard] of ShortInt = (
{ Pick Pockets *}(15, 10),
{ Open Locks }(10, -1),
{ Find/Remove Traps }(5, -1),
{ Move Silently }(10, -1),
{ Hide in Shadows }(5, -1),
{ Detect Noise *}(15, 20),
{ Climb Walls *}(60, 50),
{ Read Languages *}(0, 5)
);
ThievingSkillRacialAdjustements: array[TRace, TThievingSkill] of shortint = (
{ Human }(0, 0, 0, 0, 0, 0, 0, 0),
{ Elf }(+5, -5, 0, +5, +10, +15, 0, 0),
{ HalfElf }(+10, 0, 0, 0, +5, 0, 0, 0),
{ Gnome }(0, +5, +10, +5, +5, +10, -15, 0),
{ Halfling }(+5, +5, +5, +10, +15, +5, -15, -5),
{ Dward }(0, +10, +15, 0, 0, 0, -10, -5)
);
ThievingSkillDexterityAdjustements: array[0..8] of TThievingSkillDexterityAdjustement = (
(score: 9; bonus: (-15, -10, -10, -20)),
(score: 10; bonus: (-10, -5, -10, -15)),
(score: 11; bonus: (-5, 0, -5, -10)),
(score: 12; bonus: (0, 0, 0, -5)),
(score: 13; bonus: (0, 0, 0, 0)),
(score: 16; bonus: (0, +5, 0, 0)),
(score: 17; bonus: (+5, +10, 0, +5)),
(score: 18; bonus: (+10, +15, +5, +10)),
(score: 19; bonus: (+15, +20, +10, +15))
);
// Step 4: Choose an Alignment (chapter 4)
type
TAlignment = ( //陣營
LG, NG, CG, //守序善良 中立善良 混乱善良
LN, NN, CN, //守序中立 绝对中立 混乱中立
LE, NE, CE //守序邪恶 中立邪恶 混乱邪恶
);
TAlignments = set of TAlignment;
const
ClassAlignments: array[TClass] of TAlignments = ( //职业阵营
{ Fighter }[LG, NG, CG, LN, NN, CN, LE, NE, CE],
{ Ranger }[LG, NG, CG],
{ Paladin }[LG],
{ Mage }[LG, NG, CG, LN, NN, CN, LE, NE, CE],
{ Cleric }[LG, NG, CG, LN, NN, CN, LE, NE, CE],
{ Druid }[NN],
{ Thief }[LG, NG, CG, LN, NN, CN, LE, NE, CE],
{ Bard }[NG, LN, NN, CN, NE]
);
// Step 5: Record Saving Throws and THAC0 (chapter 9)
// Step 6: Roll Hit Points (chapter 3)
// Step 7: Record Base Movement (chapter 14)
// Step 8: Select Proficiencies (optional, chapter 5)
type
TProficiencies = record
Initial: byte;
PerLevel: byte;
end;
TProficiencySlot = record
Classes: TClasses;
Weapon: TProficiencies;
Penality: ShortInt;
NonWeapon: TProficiencies;
end;
const
ProficiencySlots: array[0..3] of TProficiencySlot = (
(Classes: Warrior; Weapon: (Initial: 4; PerLevel: 3); Penality: - 2; NonWeapon: (Initial: 3; PerLevel: 3)),
(Classes: Wizard; Weapon: (Initial: 1; PerLevel: 6); Penality: - 5; NonWeapon: (Initial: 4; PerLevel: 3)),
(Classes: Priest; Weapon: (Initial: 2; PerLevel: 4); Penality: - 3; NonWeapon: (Initial: 4; PerLevel: 3)),
(Classes: Rogue; Weapon: (Initial: 2; PerLevel: 4); Penality: - 3; NonWeapon: (Initial: 3; PerLevel: 4))
);
// Step 9: Equip Your Character (chapter 6)
type
TPiece = (Copper, Silver, Electrum, Gold, Platinium);
TFunds = record
Classes: TClasses;
base: byte;
dice: TDice;
end;
const
InitialFunds: array[0..3] of TFunds = (// *10 GP
(Classes: Warrior; base: 0; Dice: (count: 5; faces: 4)),
(Classes: Wizard; base: 1; Dice: (count: 1; faces: 4)),
(Classes: Priest; base: 0; Dice: (count: 2; faces: 6)),
(Classes: Rogue; base: 0; Dice: (count: 3; faces: 6))
);
// Weapons
type
TWeapon = (
HandCrossbow, HeavyCrossbow,
ShortBow, CompositeShortBow, LongBow, CompositeLongBow,
Staff, Knife, Dagger, Scimitar,
BastardSword, ShortSword, TwoHandSword,
MorningStar, FootmansFlail, Club, BattleAxe, Warhammer,
LanceLegere, LanceLourde,
StaffSling, Dart, Sling,
ThrowingAxe, ThrowingKnife
);
TWeapons = set of TWeapon;
const
ClassWeapons: array[TClass] of TWeapons = (
{ Fighter }[HandCrossbow..ThrowingKnife],
{ Ranger }[HandCrossbow..ThrowingKnife],
{ Paladin }[HandCrossbow..ThrowingKnife],
{ Mage }[Staff..Dagger, Dart..Sling, ThrowingKnife],
{ Cleric }[Staff, MorningStar, FootmansFlail..Club, Warhammer, Sling],
{ Druid }[Staff, Dagger, Scimitar, Dart, Sling, Club, ThrowingKnife],
{ Thief }[HandCrossbow, ShortBow, CompositeShortBow, Staff, Knife, Dagger, ShortSword, Dart, Sling, Club, ThrowingKnife],
{ Bard }[HandCrossbow..ThrowingKnife]
);
ClassWeaponCount: array[TClass] of byte = (4, 4, 4, 1, 2, 2, 2, 2);
implementation
end.
|
|