Commit e3b249beed986c0a8b423c65b22793b989b54514

Authored by dg
1 parent 25e5b1af

Permadeath mode: Exploration Mode with infinite lives. Donators feature


git-svn-id: http://svn.net-core.org/repos/t-engine4@4209 51575b47-30f0-44d4-a5cc-537603b46e54
1   -All the tiles of the "shockbolt" tileset, located in all the "gfx/shockbolt"
  1 +All the tiles of the "shockbolt" tileset, located in all the "gfx/shockbolt" and "gfx/lore"
2 2 folders are granted to use with the Tales of Maj'Eyal game only.
3 3
4 4 Please contact darkgod@te4.org for more informations.
... ...
... ... @@ -189,12 +189,12 @@ newBirthDescriptor{
189 189 }
190 190
191 191 --------------- Permadeath
192   ---[[
193 192 newBirthDescriptor{
194 193 type = "permadeath",
195 194 name = "Exploration",
196   - locked = function(birther) return birther:isDonator() or "hide" end,
  195 + locked = function(birther) return birther:isDonator() end,
197 196 locked_desc = "Exploration mode: Infinite lives (donator feature)",
  197 + locked_select = function(birther) birther:selectExplorationNoDonations() end,
198 198 selection_default = config.settings.tome.default_birth and config.settings.tome.default_birth.permadeath == "Exploration",
199 199 desc =
200 200 {
... ... @@ -208,7 +208,6 @@ newBirthDescriptor{
208 208 infinite_lifes = 1,
209 209 },
210 210 }
211   ---]]
212 211 newBirthDescriptor{
213 212 type = "permadeath",
214 213 name = "Adventure",
... ...
... ... @@ -359,6 +359,7 @@ function _M:permadeathUse(item)
359 359 if not item then return end
360 360 if item.locked then
361 361 self.c_permadeath.c_list.sel = self.c_permadeath.previous
  362 + if item.locked_select then item.locked_select(self) end
362 363 else
363 364 self:setDescriptor("permadeath", item.id)
364 365
... ... @@ -543,7 +544,7 @@ function _M:generatePermadeaths()
543 544 if self:isDescriptorAllowed(d) then
544 545 local locked = self:getLock(d)
545 546 if locked == true then
546   - list[#list+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, "-- locked --", {"font", "normal"}}:toString(), id=d.name, locked=true, desc=d.locked_desc..locktext }
  547 + list[#list+1] = { name = tstring{{"font", "italic"}, {"color", "GREY"}, "-- locked --", {"font", "normal"}}:toString(), id=d.name, locked=true, desc=d.locked_desc..locktext, locked_select=d.locked_select }
547 548 elseif locked == false then
548 549 local desc = d.desc
549 550 if type(desc) == "table" then desc = table.concat(d.desc, "\n") end
... ... @@ -907,6 +908,24 @@ function _M:setTile(f, w, h, last)
907 908 end
908 909 end
909 910
  911 +function _M:selectExplorationNoDonations()
  912 + Dialog:yesnoLongPopup("Exploration mode",
  913 + [[Exploration mode provides the characters using it with infinite lives.
  914 +Tales of Maj'Eyal is meant to be a very replayable game in which you get better by learning from mistakes (and thus from dying too).
  915 +I realize this can not please everybody and after multiple requests I have decided to grant exploration mode to donators, because it will allow player that like the game to see it all if they wish.
  916 +Beware though, infinite lives does not mean the difficulty is reduced, only that you can try as much as you want without restarting.
  917 +
  918 +If you'd like to use this feature and find this game good you should consider donating. It will help ensure its survival.
  919 +While this is a free game that I am doing for fun, if it can help feed my family a bit I certainly will not complain as real life can be harsh sometimes.
  920 +You will need an online profile active and connected for the tile selector to enable. If you choose to donate now you will need to restart the game to be granted access.
  921 +
  922 +Donators will also gain access to the custom tiles for their characters.]], 400, function(ret)
  923 + if not ret then
  924 + game:registerDialog(require("mod.dialogs.Donation").new("exploration-mode"))
  925 + end
  926 + end, "Later", "Donate!")
  927 +end
  928 +
910 929 function _M:selectTileNoDonations()
911 930 Dialog:yesnoLongPopup("Custom tiles",
912 931 [[Custom Tiles have been added as a thank you to everyone that has donated to ToME.
... ... @@ -914,7 +933,9 @@ They are a fun cosmetic feature that allows you to choose a tile for your charac
914 933
915 934 If you'd like to use this feature and find this game good you should consider donating. It will help ensure its survival.
916 935 While this is a free game that I am doing for fun, if it can help feed my family a bit I certainly will not complain as real life can be harsh sometimes.
917   -You will need an online profile active and connected for the tile selector to enable. If you choose to donate now you will need to restart the game to be granted access.]], 400, function(ret)
  936 +You will need an online profile active and connected for the tile selector to enable. If you choose to donate now you will need to restart the game to be granted access.
  937 +
  938 +Donators will also gain access to the Exploration Mode featuring infinite lives.]], 400, function(ret)
918 939 if not ret then
919 940 game:registerDialog(require("mod.dialogs.Donation").new("custom-tiles"))
920 941 end
... ...
... ... @@ -44,7 +44,8 @@ It is my dearest hope that you find my game enjoyable, and that you will continu
44 44
45 45 ToME is free and open-source and will stay that way, but that does not mean I can live without money, so I have come to disturb you here and now to ask for your kindness.
46 46 If you feel that the (many) hours you have spent having fun were worth it, please consider making a donation for the future of the game.
47   -]]}
  47 +
  48 +Donators are also granted a few special features: #GOLD#Custom character tiles#WHITE# and #GOLD#Exploration mode (infinite lives)#WHITE#.]]}
48 49 else
49 50 -- Recurring donation
50 51 recur = true
... ...