mirror of
https://github.com/sigonasr2/hamster.git
synced 2025-07-01 19:02:19 -05:00
Add in basic terrain powerup effect modifiers.
This commit is contained in:
parent
b1e418bbc7
commit
9673cadd7c
@ -5571,12 +5571,12 @@
|
||||
<property name="Terrain Type" type="int" propertytype="TerrainType" value="5"/>
|
||||
</properties>
|
||||
</tile>
|
||||
<tile id="1165" type="TileProps">
|
||||
<tile id="1165" type="TileProps" probability="4">
|
||||
<properties>
|
||||
<property name="Terrain Type" type="int" propertytype="TerrainType" value="4"/>
|
||||
</properties>
|
||||
</tile>
|
||||
<tile id="1166" type="TileProps">
|
||||
<tile id="1166" type="TileProps" probability="10">
|
||||
<properties>
|
||||
<property name="Terrain Type" type="int" propertytype="TerrainType" value="4"/>
|
||||
</properties>
|
||||
@ -5671,7 +5671,7 @@
|
||||
<property name="Terrain Type" type="int" propertytype="TerrainType" value="5"/>
|
||||
</properties>
|
||||
</tile>
|
||||
<tile id="1193" type="TileProps">
|
||||
<tile id="1193" type="TileProps" probability="4">
|
||||
<properties>
|
||||
<property name="Terrain Type" type="int" propertytype="TerrainType" value="4"/>
|
||||
</properties>
|
||||
|
@ -23,13 +23,13 @@
|
||||
1237,1149,1177,494,494,494,494,1238,1178,1328,1380,1385,1385,1385,1385,1385,1385,1382,1328,1386,1386,1110,1413,1413,1413,1081,494,1149,1235,1152,
|
||||
494,1121,1149,1121,494,1149,1179,1266,1206,1328,1408,1381,1381,1381,1381,1381,1381,1410,1328,494,1238,1107,1108,1108,1108,1109,494,494,494,1149,
|
||||
494,494,494,494,494,494,1235,1154,1234,1328,1328,1328,1328,1328,1328,1328,1328,1328,1328,494,1210,1209,494,1177,494,494,1149,1121,1121,494,
|
||||
1149,494,494,1177,1121,1177,494,1210,1178,1149,1121,494,494,1177,1210,1178,494,494,494,1121,1235,1237,494,1177,494,494,1149,1149,1179,1264,
|
||||
494,1149,1121,1149,494,1121,494,1238,1178,494,494,494,494,494,1210,1206,494,1149,494,1121,1177,1177,494,494,494,494,494,1121,1238,1150,
|
||||
494,494,1177,1121,494,494,1121,1210,1206,494,494,1121,494,1121,1235,1237,1177,494,494,494,494,494,494,494,494,1121,494,1149,1207,1262,
|
||||
1149,494,1177,494,1177,494,494,1182,1234,494,494,494,1177,1121,1121,494,494,494,494,1149,494,494,1121,494,1177,494,1121,1121,1207,1150,
|
||||
494,1149,494,494,494,494,1121,1238,1209,1121,494,494,1149,494,494,1121,1121,1179,1180,1180,1265,1263,1265,1263,1180,1264,1180,1263,1266,1262,
|
||||
1179,1263,1264,1264,1010,1012,1012,1012,1014,1149,494,494,494,1121,1177,494,1177,1210,1150,1236,1151,1153,1153,1152,1153,1236,1153,1154,1150,1151,
|
||||
1235,1151,1151,1152,1038,102,981,102,1070,1177,1177,1179,1263,1180,1264,1263,1264,1266,1178,494,494,1177,1149,1149,1121,494,1179,1266,1209,1121,
|
||||
1149,494,494,1177,1121,1177,494,1210,1178,1149,1121,494,494,1177,1210,1178,494,494,494,1121,1166,1166,1194,1167,1167,1194,1166,1149,1179,1264,
|
||||
494,1149,1121,1149,494,1121,494,1238,1178,494,494,494,494,494,1210,1206,494,1149,494,1121,1167,1167,1166,1167,1167,1166,1166,1121,1238,1150,
|
||||
494,494,1177,1121,494,494,1121,1210,1206,494,494,1121,494,1121,1235,1237,1177,494,494,494,1167,1166,1224,1225,1226,1167,1167,1149,1207,1262,
|
||||
1149,494,1177,494,1177,494,494,1182,1234,494,494,494,1177,1121,1121,494,494,494,494,1149,1194,1194,1252,1253,1254,1167,1167,1121,1207,1150,
|
||||
494,1149,494,494,494,494,1121,1238,1209,1121,494,494,1149,494,494,1121,1121,1179,1180,1180,1194,1194,1280,1281,1282,1167,1166,1263,1266,1262,
|
||||
1179,1263,1264,1264,1010,1012,1012,1012,1014,1149,494,494,494,1121,1177,494,1177,1210,1150,1236,1167,1167,1167,1166,1166,1167,1167,1154,1150,1151,
|
||||
1235,1151,1151,1152,1038,102,981,102,1070,1177,1177,1179,1263,1180,1264,1263,1264,1266,1178,494,1167,1167,1167,1167,1167,1194,1167,1266,1209,1121,
|
||||
494,494,494,494,1066,102,102,102,1042,494,494,1210,1150,1151,1151,1153,1154,1150,1237,494,1121,494,1149,494,494,1121,1207,1150,1237,1149,
|
||||
1149,1121,494,1177,1094,102,981,102,1042,1177,494,1235,1237,494,494,1121,1210,1178,1121,494,1177,494,1149,494,1149,494,1182,1234,494,494,
|
||||
1181,1177,1121,1149,1066,1009,981,102,1098,1181,1177,494,1177,494,494,494,1182,1206,1121,494,494,1121,1149,494,494,1177,1210,1178,494,1177,
|
||||
|
@ -204,20 +204,22 @@ const Terrain::TerrainType Hamster::GetTerrainStandingOn()const{
|
||||
|
||||
const float Hamster::GetTimeToMaxSpeed()const{
|
||||
float finalTimeToMaxSpd{DEFAULT_TIME_TO_MAX_SPD};
|
||||
if(GetTerrainStandingOn()==Terrain::ICE)finalTimeToMaxSpd*=3;
|
||||
if(!HasPowerup(Powerup::ICE)&&GetTerrainStandingOn()==Terrain::ICE)finalTimeToMaxSpd*=3;
|
||||
else if(!HasPowerup(Powerup::SWAMP)&&GetTerrainStandingOn()==Terrain::SWAMP)finalTimeToMaxSpd*=1.25;
|
||||
return finalTimeToMaxSpd;
|
||||
}
|
||||
const float Hamster::GetMaxSpeed()const{
|
||||
float finalMaxSpd{DEFAULT_MAX_SPD};
|
||||
switch(GetTerrainStandingOn()){
|
||||
case Terrain::GRASS:{
|
||||
finalMaxSpd*=0.80f;
|
||||
if(!HasPowerup(Powerup::GRASS))finalMaxSpd*=0.80f;
|
||||
}break;
|
||||
case Terrain::SAND:{
|
||||
finalMaxSpd*=0.60f;
|
||||
if(!HasPowerup(Powerup::SAND))finalMaxSpd*=0.60f;
|
||||
}break;
|
||||
case Terrain::SWAMP:{
|
||||
finalMaxSpd*=0.50f;
|
||||
if(HasPowerup(Powerup::SWAMP))finalMaxSpd*=0.80f;
|
||||
else finalMaxSpd*=0.50f;
|
||||
}break;
|
||||
case Terrain::SHORE:{
|
||||
finalMaxSpd*=0.80f;
|
||||
@ -226,20 +228,21 @@ const float Hamster::GetMaxSpeed()const{
|
||||
finalMaxSpd*=0.10f;
|
||||
}break;
|
||||
case Terrain::FOREST:{
|
||||
finalMaxSpd*=0.50f;
|
||||
if(!HasPowerup(Powerup::FOREST))finalMaxSpd*=0.50f;
|
||||
}break;
|
||||
}
|
||||
if(HasPowerup(Powerup::WHEEL))finalMaxSpd*=1.5f;
|
||||
return finalMaxSpd;
|
||||
}
|
||||
const float Hamster::GetFriction()const{
|
||||
float finalFriction{DEFAULT_FRICTION};
|
||||
if(GetTerrainStandingOn()==Terrain::ICE)finalFriction*=0.1f;
|
||||
else if(GetTerrainStandingOn()==Terrain::SWAMP)finalFriction*=0.6f;
|
||||
if(!HasPowerup(Powerup::ICE)&&GetTerrainStandingOn()==Terrain::ICE)finalFriction*=0.1f;
|
||||
else if(!HasPowerup(Powerup::SWAMP)&&GetTerrainStandingOn()==Terrain::SWAMP)finalFriction*=0.6f;
|
||||
return finalFriction;
|
||||
}
|
||||
const float Hamster::GetTurnSpeed()const{
|
||||
float finalTurnSpd{DEFAULT_TURN_SPD};
|
||||
if(GetTerrainStandingOn()==Terrain::ICE)finalTurnSpd*=0.6f;
|
||||
if(!HasPowerup(Powerup::ICE)&&GetTerrainStandingOn()==Terrain::ICE)finalTurnSpd*=0.6f;
|
||||
return finalTurnSpd;
|
||||
}
|
||||
const float Hamster::GetBumpAmount()const{
|
||||
|
Loading…
x
Reference in New Issue
Block a user