Cleanup battle globals, buff drop accuracy, organic level 7 drop can take out a level 12, all tracks have the same carry limit

This commit is contained in:
John 2015-08-31 11:50:53 +03:00
parent 88888c3457
commit 0a0b8b4019
2 changed files with 92 additions and 615 deletions

View file

@ -150,9 +150,8 @@ class InventoryBase(DirectObject.DirectObject):
def getMax(self, track, level):
if type(track) == type(''):
track = Tracks.index(track)
maxList = CarryLimits[track]
if self.toon.experience:
return maxList[self.toon.experience.getExpLevel(track)][level]
return CarryLimits[self.toon.experience.getExpLevel(track)][level]
else:
return 0

View file

@ -1,6 +1,7 @@
from ToontownGlobals import *
import math
import TTLocalizer
BattleCamFaceOffFov = 30.0
BattleCamFaceOffPos = Point3(0, -10, 4)
BattleCamDefaultPos = Point3(0, -8.6, 16.5)
@ -13,13 +14,15 @@ SkipMovie = 0
BaseHp = 15
Tracks = TTLocalizer.BattleGlobalTracks
NPCTracks = TTLocalizer.BattleGlobalNPCTracks
TrackColors = ((211 / 255.0, 148 / 255.0, 255 / 255.0),
TrackColors = (
(211 / 255.0, 148 / 255.0, 255 / 255.0),
(249 / 255.0, 255 / 255.0, 93 / 255.0),
(79 / 255.0, 190 / 255.0, 76 / 255.0),
(93 / 255.0, 108 / 255.0, 239 / 255.0),
(255 / 255.0, 145 / 255.0, 66 / 255.0),
(255 / 255.0, 65 / 255.0, 199 / 255.0),
(67 / 255.0, 243 / 255.0, 255 / 255.0))
(67 / 255.0, 243 / 255.0, 255 / 255.0)
)
HEAL_TRACK = 0
TRAP_TRACK = 1
LURE_TRACK = 2
@ -40,55 +43,15 @@ NUM_GAG_TRACKS = 7
PropTypeToTrackBonus = {AnimPropTypes.Hydrant: SQUIRT_TRACK,
AnimPropTypes.Mailbox: THROW_TRACK,
AnimPropTypes.Trashcan: HEAL_TRACK}
Levels = [[0,
20,
200,
800,
2000,
6000,
10000],
[0,
20,
100,
800,
2000,
6000,
10000],
[0,
20,
100,
800,
2000,
6000,
10000],
[0,
40,
200,
1000,
2500,
7500,
10000],
[0,
10,
50,
400,
2000,
6000,
10000],
[0,
10,
50,
400,
2000,
6000,
10000],
[0,
20,
100,
500,
2000,
6000,
10000]]
Levels = [
[0, 20, 200, 800, 2000, 6000, 10000],
[0, 20, 100, 800, 2000, 6000, 10000],
[0, 20, 100, 800, 2000, 6000, 10000],
[0, 40, 200, 1000, 2500, 7500, 10000],
[0, 10, 50, 400, 2000, 6000, 10000],
[0, 10, 50, 400, 2000, 6000, 10000],
[0, 20, 100, 500, 2000, 6000, 10000]
]
regMaxSkill = 10000
UberSkill = 500
MaxSkill = UberSkill + regMaxSkill
@ -97,349 +60,15 @@ ExperienceCap = 300
MaxToonAcc = 95
StartingLevel = 0
CarryLimits = (((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)),
((5,
0,
0,
0,
0,
0,
0),
(7,
3,
0,
0,
0,
0,
0),
(10,
7,
3,
0,
0,
0,
0),
(15,
10,
7,
3,
0,
0,
0),
(15,
15,
10,
7,
3,
0,
0),
(20,
15,
15,
10,
7,
3,
0),
(20,
15,
15,
10,
7,
3,
1)),
((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)),
((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)),
((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)),
((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)),
((10,
0,
0,
0,
0,
0,
0),
(10,
5,
0,
0,
0,
0,
0),
(15,
10,
5,
0,
0,
0,
0),
(20,
15,
10,
5,
0,
0,
0),
(25,
20,
15,
10,
3,
0,
0),
(30,
25,
20,
15,
7,
3,
0),
(30,
25,
20,
15,
7,
3,
1)))
CarryLimits = (
(10, 0, 0, 0, 0, 0, 0),
(10, 5, 0, 0, 0, 0, 0),
(15, 10, 5, 0, 0, 0, 0),
(20, 15, 10, 5, 0, 0, 0),
(25, 20, 15, 10, 3, 0, 0),
(30, 25, 20, 15, 7, 3, 0),
(30, 25, 20, 15, 7, 3, 1)
)
MaxProps = ((15, 40), (30, 60), (75, 80))
DLF_SKELECOG = 1
DLF_FOREMAN = 2
@ -447,265 +76,114 @@ DLF_BOSS = 4
DLF_SUPERVISOR = 8
DLF_VIRTUAL = 16
DLF_REVIVES = 32
pieNames = ['tart',
'fruitpie-slice',
'creampie-slice',
'fruitpie',
'creampie',
'birthday-cake',
'wedding-cake',
'lawbook']
AvProps = (('feather',
'bullhorn',
'lipstick',
'bamboocane',
'pixiedust',
'baton',
'baton'),
('banana',
'rake',
'marbles',
'quicksand',
'trapdoor',
'tnt',
'traintrack'),
('1dollar',
'smmagnet',
'5dollar',
'bigmagnet',
'10dollar',
'hypnogogs',
'hypnogogs'),
('bikehorn',
'whistle',
'bugle',
'aoogah',
'elephant',
'foghorn',
'singing'),
('cupcake',
'fruitpieslice',
'creampieslice',
'fruitpie',
'creampie',
'cake',
'cake'),
('flower',
'waterglass',
'waterballoon',
'bottle',
'firehose',
'stormcloud',
'stormcloud'),
('flowerpot',
'sandbag',
'anvil',
'weight',
'safe',
'piano',
'piano'))
AvPropsNew = (('inventory_feather',
'inventory_megaphone',
'inventory_lipstick',
'inventory_bamboo_cane',
'inventory_pixiedust',
'inventory_juggling_cubes',
'inventory_ladder'),
('inventory_bannana_peel',
'inventory_rake',
'inventory_marbles',
'inventory_quicksand_icon',
'inventory_trapdoor',
'inventory_tnt',
'inventory_traintracks'),
('inventory_1dollarbill',
'inventory_small_magnet',
'inventory_5dollarbill',
'inventory_big_magnet',
'inventory_10dollarbill',
'inventory_hypno_goggles',
'inventory_screen'),
('inventory_bikehorn',
'inventory_whistle',
'inventory_bugle',
'inventory_aoogah',
'inventory_elephant',
'inventory_fog_horn',
'inventory_opera_singer'),
('inventory_tart',
'inventory_fruit_pie_slice',
'inventory_cream_pie_slice',
'inventory_fruitpie',
'inventory_creampie',
'inventory_cake',
'inventory_wedding'),
('inventory_squirt_flower',
'inventory_glass_of_water',
'inventory_water_gun',
'inventory_seltzer_bottle',
'inventory_firehose',
'inventory_storm_cloud',
'inventory_geyser'),
('inventory_flower_pot',
'inventory_sandbag',
'inventory_anvil',
'inventory_weight',
'inventory_safe_box',
'inventory_piano',
'inventory_ship'))
pieNames = ['tart', 'fruitpie-slice', 'creampie-slice', 'fruitpie', 'creampie', 'birthday-cake', 'wedding-cake', 'lawbook']
AvProps = (
('feather', 'bullhorn', 'lipstick', 'bamboocane', 'pixiedust', 'baton', 'baton'),
('banana', 'rake', 'marbles', 'quicksand', 'trapdoor', 'tnt', 'traintrack'),
('1dollar', 'smmagnet', '5dollar', 'bigmagnet', '10dollar', 'hypnogogs', 'hypnogogs'),
('bikehorn', 'whistle', 'bugle', 'aoogah', 'elephant', 'foghorn', 'singing'),
('cupcake', 'fruitpieslice', 'creampieslice', 'fruitpie', 'creampie', 'cake', 'cake'),
('flower', 'waterglass', 'waterballoon', 'bottle', 'firehose', 'stormcloud', 'stormcloud'),
('flowerpot', 'sandbag', 'anvil', 'weight', 'safe', 'piano', 'piano')
)
AvPropsNew = (
('inventory_feather', 'inventory_megaphone', 'inventory_lipstick', 'inventory_bamboo_cane', 'inventory_pixiedust', 'inventory_juggling_cubes', 'inventory_ladder'),
('inventory_bannana_peel', 'inventory_rake', 'inventory_marbles', 'inventory_quicksand_icon', 'inventory_trapdoor', 'inventory_tnt', 'inventory_traintracks'),
('inventory_1dollarbill', 'inventory_small_magnet', 'inventory_5dollarbill', 'inventory_big_magnet', 'inventory_10dollarbill', 'inventory_hypno_goggles', 'inventory_screen'),
('inventory_bikehorn', 'inventory_whistle', 'inventory_bugle', 'inventory_aoogah', 'inventory_elephant', 'inventory_fog_horn', 'inventory_opera_singer'),
('inventory_tart', 'inventory_fruit_pie_slice', 'inventory_cream_pie_slice', 'inventory_fruitpie', 'inventory_creampie', 'inventory_cake', 'inventory_wedding'),
('inventory_squirt_flower', 'inventory_glass_of_water', 'inventory_water_gun', 'inventory_seltzer_bottle', 'inventory_firehose', 'inventory_storm_cloud', 'inventory_geyser'),
('inventory_flower_pot', 'inventory_sandbag', 'inventory_anvil', 'inventory_weight', 'inventory_safe_box', 'inventory_piano', 'inventory_ship')
)
AvPropStrings = TTLocalizer.BattleGlobalAvPropStrings
AvPropStringsSingular = TTLocalizer.BattleGlobalAvPropStringsSingular
AvPropStringsPlural = TTLocalizer.BattleGlobalAvPropStringsPlural
AvPropAccuracy = ((70,
70,
70,
70,
70,
70,
100),
(0,
0,
0,
0,
0,
0,
0),
(50,
50,
60,
60,
70,
70,
90),
(95,
95,
95,
95,
95,
95,
95),
(75,
75,
75,
75,
75,
75,
75),
(95,
95,
95,
95,
95,
95,
95),
(50,
50,
50,
50,
50,
50,
50))
AvLureBonusAccuracy = (60,
60,
70,
70,
80,
80,
100)
AvPropAccuracy = (
(70, 70, 70, 70, 70, 70, 100),
(0, 0, 0, 0, 0, 0, 0),
(50, 50, 60, 60, 70, 70, 90),
(95, 95, 95, 95, 95, 95, 95),
(75, 75, 75, 75, 75, 75, 75),
(95, 95, 95, 95, 95, 95, 95),
(70, 70, 70, 70, 70, 70, 70)
)
AvLureBonusAccuracy = (60, 60, 70, 70, 80, 80, 100)
AvTrackAccStrings = TTLocalizer.BattleGlobalAvTrackAccStrings
AvPropDamage = ((((8, 10), (Levels[0][0], Levels[0][1])),
AvPropDamage = (
( # Toon-up
((8, 10), (Levels[0][0], Levels[0][1])),
((15, 18), (Levels[0][1], Levels[0][2])),
((25, 30), (Levels[0][2], Levels[0][3])),
((40, 45), (Levels[0][3], Levels[0][4])),
((60, 70), (Levels[0][4], Levels[0][5])),
((90, 120), (Levels[0][5], Levels[0][6])),
((210, 210), (Levels[0][6], MaxSkill))),
(((10, 12), (Levels[1][0], Levels[1][1])),
((210, 210), (Levels[0][6], MaxSkill))
),
( # Trap
((10, 12), (Levels[1][0], Levels[1][1])),
((18, 20), (Levels[1][1], Levels[1][2])),
((30, 35), (Levels[1][2], Levels[1][3])),
((45, 50), (Levels[1][3], Levels[1][4])),
((60, 70), (Levels[1][4], Levels[1][5])),
((90, 180), (Levels[1][5], Levels[1][6])),
((195, 195), (Levels[1][6], MaxSkill))),
(((0, 0), (0, 0)),
((195, 195), (Levels[1][6], MaxSkill))
),
( # Lure
((0, 0), (0, 0)),
((0, 0), (0, 0)),
((0, 0), (0, 0)),
((0, 0), (0, 0)),
((0, 0), (0, 0)),
((0, 0), (0, 0))),
(((3, 4), (Levels[3][0], Levels[3][1])),
((0, 0), (0, 0)),
((0, 0), (0, 0))
),
( # Sound
((3, 4), (Levels[3][0], Levels[3][1])),
((5, 7), (Levels[3][1], Levels[3][2])),
((9, 11), (Levels[3][2], Levels[3][3])),
((14, 16), (Levels[3][3], Levels[3][4])),
((19, 21), (Levels[3][4], Levels[3][5])),
((25, 50), (Levels[3][5], Levels[3][6])),
((90, 90), (Levels[3][6], MaxSkill))),
(((4, 6), (Levels[4][0], Levels[4][1])),
((90, 90), (Levels[3][6], MaxSkill))
),
( # Throw
((4, 6), (Levels[4][0], Levels[4][1])),
((8, 10), (Levels[4][1], Levels[4][2])),
((14, 17), (Levels[4][2], Levels[4][3])),
((24, 27), (Levels[4][3], Levels[4][4])),
((36, 40), (Levels[4][4], Levels[4][5])),
((48, 100), (Levels[4][5], Levels[4][6])),
((120, 120), (Levels[4][6], MaxSkill))),
(((3, 4), (Levels[5][0], Levels[5][1])),
((120, 120), (Levels[4][6], MaxSkill))
),
( # Squirt
((3, 4), (Levels[5][0], Levels[5][1])),
((6, 8), (Levels[5][1], Levels[5][2])),
((10, 12), (Levels[5][2], Levels[5][3])),
((18, 21), (Levels[5][3], Levels[5][4])),
((27, 30), (Levels[5][4], Levels[5][5])),
((36, 80), (Levels[5][5], Levels[5][6])),
((105, 105), (Levels[5][6], MaxSkill))),
(((10, 10), (Levels[6][0], Levels[6][1])),
((105, 105), (Levels[5][6], MaxSkill))
),
( # Drop
((10, 10), (Levels[6][0], Levels[6][1])),
((18, 18), (Levels[6][1], Levels[6][2])),
((30, 30), (Levels[6][2], Levels[6][3])),
((45, 45), (Levels[6][3], Levels[6][4])),
((60, 60), (Levels[6][4], Levels[6][5])),
((85, 170), (Levels[6][5], Levels[6][6])),
((180, 180), (Levels[6][6], MaxSkill))))
((80, 170), (Levels[6][5], Levels[6][6])),
((195, 195), (Levels[6][6], MaxSkill))
)
)
ATK_SINGLE_TARGET = 0
ATK_GROUP_TARGET = 1
AvPropTargetCat = ((ATK_SINGLE_TARGET,
ATK_GROUP_TARGET,
ATK_SINGLE_TARGET,
ATK_GROUP_TARGET,
ATK_SINGLE_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET),
(ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET),
(ATK_GROUP_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET,
ATK_GROUP_TARGET),
(ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_SINGLE_TARGET,
ATK_GROUP_TARGET))
AvPropTarget = (0,
3,
0,
2,
3,
3,
3)
NumRoundsLured = [2,
2,
3,
3,
4,
4,
15]
AvPropTargetCat = (
(ATK_SINGLE_TARGET, ATK_GROUP_TARGET, ATK_SINGLE_TARGET, ATK_GROUP_TARGET, ATK_SINGLE_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET),
(ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET),
(ATK_GROUP_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET, ATK_GROUP_TARGET),
(ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_SINGLE_TARGET, ATK_GROUP_TARGET)
)
AvPropTarget = (0, 3, 0, 2, 3, 3, 3)
NumRoundsLured = [2, 2, 3, 3, 4, 4, 15]
def getAvPropDamage(attackTrack, attackLevel, exp, organicBonus = False, propBonus = False, propAndOrganicBonusStack = False):
if attackTrack == LURE_TRACK: