Skip to content

Commit

Permalink
Merge pull request #2350 from hawkthorne/master
Browse files Browse the repository at this point in the history
Bugfix 0.12.2
  • Loading branch information
niamu committed May 12, 2015
2 parents fe77586 + db01620 commit ab4d4d7
Show file tree
Hide file tree
Showing 46 changed files with 2,113 additions and 989 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
install:
- sudo apt-get install python-virtualenv unzip lua5.1
- sudo apt-get install python-virtualenv lua5.1
- sudo make /usr/bin/love
- mkdir -p $TRAVIS_BUILD_DIR/share/love/
env:
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ bin/tmx2lua:

bin/love.app/Contents/MacOS/love:
mkdir -p bin
$(wget) https://bitbucket.org/rude/love/downloads/love-0.9.0-macosx-x64.zip
unzip -q love-0.9.0-macosx-x64.zip
rm -f love-0.9.0-macosx-x64.zip
$(wget) https://bitbucket.org/rude/love/downloads/love-0.9.1-macosx-x64.zip
unzip -q love-0.9.1-macosx-x64.zip
rm -f love-0.9.1-macosx-x64.zip
mv love.app bin
cp osx/Info.plist bin/love.app/Contents

Expand Down
6 changes: 5 additions & 1 deletion make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ foreach($fileName in $fileEntries)

if($args[0] -eq "run"){
Write-Host "Running Journey to the Center of Hawkthorne..."
.\bin\love-0.9.1-win32\love.exe src
if($args.Length -ne 1){
.\bin\love-0.9.1-win32\love.exe src $args[1..($args.Length-1)]
}else{
.\bin\love-0.9.1-win32\love.exe src
}
}elseif($args[0] -eq "test"){
Write-Host "Testing Journey to the Center of Hawkthorne..."
.\bin\love-0.9.1-win32\love.exe src --test --console
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tweepy
tweepy==2.3.0
requests==1.0.4
jinja2
jinja2==2.7.3
boto==2.8.0
markdown==2.2.1
27 changes: 14 additions & 13 deletions src/blackjackgame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local DECKRESHUFFLE = 2*52 -- create new deck if number of cards in shoe less th
local NUMDECKS = 6

function state:init()
-- Graphical Initiation
-- Graphical Initiation
self.table = love.graphics.newImage( 'images/cards/card_table_blackjack.png' )

self.cardSprite = love.graphics.newImage('images/cards/cards.png' )
Expand Down Expand Up @@ -72,7 +72,7 @@ function state:init()
self.playerHand={}
self.dealerHand={}
self.is_blackjack = false
self.currentBet = 2
self.currentBet = 2
end

function state:enter(previous, player, screenshot)
Expand Down Expand Up @@ -101,7 +101,7 @@ function state:enter(previous, player, screenshot)

self.dealer_result_pos_x = 346 + camera.x
self.dealer_result_pos_y = 89 + camera.y

self.outcome_pos_x = 225 + camera.x
self.outcome_pos_y = 141 + camera.y

Expand Down Expand Up @@ -132,7 +132,7 @@ function state:keypressed(button, player)

if button == 'JUMP' then
if self.selected == 'DEAL' then
self:dealHand()
if not self.cards_moving then self:dealHand() end
elseif self.selected == 'HIT' then
if not self.cards_moving then self:hit() end
elseif self.selected == 'STAND' then
Expand All @@ -143,7 +143,7 @@ function state:keypressed(button, player)
if not self.cards_moving then self:split() end
elseif self.selected == 'BET +' then
local betDelta = 0
if (self.currentBet < self.player.money and self.currentBet < 15) then
if (self.currentBet < self.player.money and self.currentBet < 15) then
betDelta = 1
elseif (self.currentBet < self.player.money - 5 and self.currentBet < 50) then
betDelta = 5
Expand All @@ -156,7 +156,7 @@ function state:keypressed(button, player)
else
betDelta = 0
end
self.currentBet = self.currentBet + betDelta
self.currentBet = self.currentBet + betDelta
elseif self.selected == 'BET -' then
local betDelta = 0
if (self.currentBet > 250 and (self.currentBet -250)%100 ~= 0) then
Expand All @@ -170,7 +170,7 @@ function state:keypressed(button, player)
elseif self.currentBet > 20 then
betDelta = -5
elseif self.currentBet > 1 then
betDelta = -1
betDelta = -1
end
self.currentBet = self.currentBet + betDelta
end
Expand Down Expand Up @@ -211,7 +211,7 @@ function state:gameMenu() -- set the game menu after card additions/changes
end

-- same situation as above
if actualBets < self.player.money/2 and
if actualBets < self.player.money/2 and
self.playerHand[self.activeHand].cards[1].card==self.playerHand[self.activeHand].cards[2].card then
self.options[ 4 ].active = true -- split
else
Expand Down Expand Up @@ -305,7 +305,7 @@ function state:initTable() -- Initialize a new betting round
-- clear everyones cards
self.dealerHand[1] = {}
self:initHands(self.dealerHand[1])

self.playerHand = {}
self.playerHand[1] = {}
self:initHands(self.playerHand[1])
Expand Down Expand Up @@ -403,7 +403,7 @@ function state:dealCard(to) -- Deal out an individual card, will update score as
}
end

-- set ace flag if ace has been added
-- set ace flag if ace has been added
if deal_card.card == 1 then
hand.has_ace = true
end
Expand All @@ -425,7 +425,7 @@ function state:hit()

-- deal a card
self:dealCard('player')

-- wait for animation to complete
self.card_complete_callback =function()
self.card_complete_callback = nil
Expand Down Expand Up @@ -491,7 +491,7 @@ function state:split()
end
return
end

--deal cards for original hand, reset menu to allow for splitting and double-down
self:dealCard('player')
self:gameMenu()
Expand Down Expand Up @@ -573,6 +573,7 @@ function state:stand()
if self.player.money < 1 then
self.player.money = 0
self:gameOver()
return
end
-- decrease current bet if player has less money than previous bet
if self.player.money < self.currentBet then
Expand Down Expand Up @@ -750,7 +751,7 @@ function state:drawCard( card, suit, flip, x, y, overlay )
limit = 0
_card = self.cardback
end

darkness = utils.map( flip, 50, limit, 100, 255 )
if(overlay) then
darkness = 150
Expand Down
1 change: 1 addition & 0 deletions src/credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ state.credits = {
'cmdoptesc',
'communityfan1107',
'condoreo',
'coolcoolcoolabed',
'coolman1081',
'coray8',
'coreyander',
Expand Down
6 changes: 3 additions & 3 deletions src/hawk/collision.lua
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ function module.move_y(map, player, x, y, width, height, dx, dy)
local sloped = module.is_sloped(tile.id)
local special = module.is_special(tile.id)
local center_x = x + (width / 2)
local tile_x = math.floor((i % map.width) - 1) * map.tilewidth
local tile_x = math.floor(((i - 1) % map.width)) * map.tilewidth

if direction == "down" and
-- Ensure that the center of the player is actually within tile (or very close)
Expand Down Expand Up @@ -329,7 +329,7 @@ function module.move_y(map, player, x, y, width, height, dx, dy)

if platform_type == "oneway" or platform_type == "no-drop" then
-- If player is in a sloped tile, keep them there
local foot = y + height
local foot = y + height - tile_slope * dx - 2
local above_tile = foot <= slope_y
local in_tile = sloped and foot > tile_y and foot <= tile_y + map.tileheight

Expand Down Expand Up @@ -393,7 +393,7 @@ function module.move_y(map, player, x, y, width, height, dx, dy)
local foot = y + height
local above_tile = foot <= platform.y

if above_tile and platform.y <= (y + dy + height) and
if above_tile and platform.y <= (new_y + height + 2) and
direction == 'down' then

if player.floor_pushback then
Expand Down
Binary file added src/images/emotions/love.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/enemies/penguin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/tutorial_wizard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/tutorial_wizard_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions src/inventory.lua
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,11 @@ function Inventory:draw( playerPosition )
if result then
local resultFolder = string.lower(result.type)..'s'
local itemNode = require ('items/' .. resultFolder .. '/' .. result.name)
-- this ugly hack shouldn't be necessary, but for whatever reason
-- the type can be overriden by the subtype of the item, so we set type by directory instead
if itemNode.directory == 'weapons/' then
itemNode.type = 'weapon'
end
local item = Item.new(itemNode)
item:draw({x=ffPos.x + 83, y=ffPos.y + 19})
end
Expand Down
2 changes: 1 addition & 1 deletion src/items/consumables/deepfrieddud.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ return{
consumable = {
randEffect = {
p = {0.4,0.6,0.8,1},
{hurt = "half"},
{hurt = 0.5},
{heal = "max"},
{buff = {
attribute = "jumpFactor",
Expand Down
8 changes: 6 additions & 2 deletions src/level.lua
Original file line number Diff line number Diff line change
Expand Up @@ -245,19 +245,23 @@ function Level:loadNode(path)
return true, class
end

function Level:restartLevel(keepPosition)
function Level:restartLevel(characterSwitch)
assert(self.name ~= "overworld","level's name cannot be overworld")
assert(Gamestate.currentState().name ~= "overworld","level cannot be overworld")
self.over = false

self.player = Player.factory(self.collider)
local old_height = self.player.previous_character_height
self.player:refreshPlayer(self.collider)
self.player.boundary = {
width = self.map.width * self.map.tilewidth,
height = self.map.height * self.map.tileheight
}

if not keepPosition then
if characterSwitch then
local new_height = self.player.character.bbox.height
self.player.position = {x = self.player.position.x, y = self.player.position.y + (old_height - new_height)}
else
self.player.position = {x = self.default_position.x, y = self.default_position.y}
end

Expand Down
4 changes: 2 additions & 2 deletions src/main.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ function love.load(arg)
error("invalid version label")
end

if(not love._version == "0.9.0" and not love.version == "0.9.1") then
error("Love 0.9.0 or 0.9.1 is required")
if(not love.version == "0.9.1") then
error("Love 0.9.1 is required")
end

-- The Mavericks builds of Love adds too many arguments
Expand Down
8 changes: 4 additions & 4 deletions src/maps/forest-hidden.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,19 @@
<object type="breakable_block" x="1272" y="144" width="48" height="48">
<properties>
<property name="crack" value="false"/>
<property name="dying_animation" value="boulder-crumble.png"/>
<property name="dying_animation" value="boulder-crumble"/>
<property name="hp" value="4"/>
<property name="sound" value="boulder-crumble"/>
<property name="sprite" value="boulder.png"/>
<property name="sprite" value="boulder"/>
</properties>
</object>
<object type="breakable_block" x="1320" y="144" width="48" height="48">
<properties>
<property name="crack" value="false"/>
<property name="dying_animation" value="boulder-crumble.png"/>
<property name="dying_animation" value="boulder-crumble"/>
<property name="hp" value="3"/>
<property name="sound" value="boulder-crumble"/>
<property name="sprite" value="boulder.png"/>
<property name="sprite" value="boulder"/>
</properties>
</object>
<object name="mushroom" type="material" x="1008" y="192" width="24" height="24"/>
Expand Down
Loading

0 comments on commit ab4d4d7

Please sign in to comment.