Coder Social home page Coder Social logo

Comments (2)

SpacedOutChicken avatar SpacedOutChicken commented on May 18, 2024

I can confirm that this problem still exists as of version 4.11.4. Here is a saved game in which Jerusalem has just started offering an Invest quest:
JerusalemInvestStart.json
And here is the game many turns later, with the Invest quest still on the table:
JerusalemInvestForever.json

from unciv.

SomeTroglodyte avatar SomeTroglodyte commented on May 18, 2024

Likely since #11224 - and the new WinnersAndLosers class not classifying all civs as either winners or losers. So - could happen to non-Invest quests as well if some Civs have score 0.

Index: core/src/com/unciv/logic/civilization/managers/QuestManager.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/core/src/com/unciv/logic/civilization/managers/QuestManager.kt b/core/src/com/unciv/logic/civilization/managers/QuestManager.kt
--- a/core/src/com/unciv/logic/civilization/managers/QuestManager.kt	(revision 7ce291329318b86ce346765e88dcb95eacaf8e0f)
+++ b/core/src/com/unciv/logic/civilization/managers/QuestManager.kt	(date 1713182374326)
@@ -272,8 +272,7 @@
         winnersAndLosers.winners.forEach { giveReward(it) }
         winnersAndLosers.losers.forEach { notifyExpired(it, winnersAndLosers.winners) }
 
-        assignedQuests.removeAll(winnersAndLosers.winners)
-        assignedQuests.removeAll(winnersAndLosers.losers)
+        assignedQuests.removeAll { it.questNameInstance == questName }  // removing winners then losers would leave those with score 0
     }
 
     private fun handleIndividualQuests() {

needs test ... done

from unciv.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.