How do you ‘do something’ to every element in a list except that one index? (C# Beginners Level Question) [closed]

I created a list of 40 buttons, each of these buttons have an ‘int counter’ that counts up incrementally to 5 whenever pressed.

If I hit button 1, the other button’s counter will reset and become 0, but the button I hit can now increase to 2, 3, 4, 5.

How would you loop the list in a way that doesn’t also reset the button being pressed?

Button itself is a class, and I have a ButtonManager that contains List< Button > Buttons

Making a level progression system similar to Bravely Default’s

So I am working on an RPG and I want the level up system to be similar to Bravely Default’s, which must be similar to how FF classically levels up characters.

What I know about the level up in the game is that.

  1. The game starts of with a large exp pool to fulfill, and the enemies give large drops of exp too (ex: in lvl 1 areas enemies give 50-150 exp points, and you need around 500 exp to reach lvl 2 and so on)
  2. The larger the level, the more exp you will need (to the point you need x0 000 exp points to continue in the midgame), however in the late game, the exp point does not increase exponentially (let’s say it doesn’t reach x00 000 not even at level 99)

Obviously, we want more effort to gain more levels, but this is more about assigning the enemies appropriate exp points depending on the region of the game.

Currently my algorith is lvl = constant * sqrt(exp), however I feel this formula doesn’t work for very large numbers.

Msg 8114, Level 16 , State 5, Line 1 Error converting data type nvarchar to float error

Just having some issue when trying to combine table using the union function keep getting this error as above

Msg 8114, Level 16 , State 5, Line 1
Error converting data type nvarchar to float error

SELECT * FROM dbo.['202004-divvy-tripdata$  '] UNION ALL  SELECT * FROM dbo.['202005-divvy-tripdata$  '] UNION All SELECT * FROM dbo.['202006-divvy-tripdata$  '] UNION all  SELECT * FROM dbo.['202007-divvy-tripdata$  '] UNION all SELECT * FROM dbo.['202008-divvy-tripdata$  '] UNION all SELECT * FROM dbo.['202009-divvy-tripdata$  '] UNION ALL SELECT * FROM dbo.['202010-divvy-tripdata$  '] UNION ALL SELECT * FROM dbo.['202011-divvy-tripdata$  '] (UNION ALL SELECT * FROM dbo.['202012-divvy-tripdata$  ']) -----> here is where it stops working and I get an error message as shown above.  

Can I get help on this?

How many spell slots does a Level 3 Warlock have?

The Warlock Table in the PHB (p106) states that a Warlock has the following:

  • 1 First-level spell slot at level 1.
  • 2 First-level spell slots at level 2.
  • 2 Second-level spell slots at level 3.

Does this mean that a third level Warlock has a cumulative 5 Spell Slots? (3 First-Level slots and 2 Second-Level slots)

Or do the new slots just replace old slots between levels such that a 3rd-level Warlock ultimately has only 2 second-level spell slots?

Is this Enhanced Eyebite balanced vs other spells of comparable level and utility?

Motivation: Many, me included consider Eyebite be cool, but mechanically very underwhelming spell for its level. So, let’s make it a balanced choice. Still, this question does not depend on if original version really is weak or not, this is only about this homebrew version.

The classes to consider as users of the spell: Bard, Sorcerer and especially Warlock, who needs to choose it as an Arcanum, the only and unchangeable 6th level spell they’ll have.

The other spells to consider as comparison points specially: Hold Monster (similar effect on target at 5th level already, for Bard and Sorcerer up-castable to 6th level for 2 targets) and then as actual 6th level aternatives, Mass Suggestion and Mental Prison (in XGtE so paywalled link), which also can be used to take enemies out of a fight, and for which Mass Suggestion has great utility use as well. There doesn’t need to be comparison against the original version of Eyebite. You can also compare to other spells up to level 6, if you think they’re relevant for the same role.

Goal of the homebrew: Eyebite should be an equal contender, when the character reaches the point where they can choose these spells.

Does this Enhanced Eyebite, description below, meet the above goal?

Enhanced Eyebite

Level: 6th
Casting Time: 1 Action
Range/Area: Self
Components: V, S
Duration: Concentration, 1 hour
School: Necromancy
Attack/Save: WIS Save

For the spell’s duration, your eyes become an inky void imbued with dread power. One creature of your choice within 90 feet of you that you can see must succeed on a Wisdom saving throw or be affected by one of the following effects of your choice for the duration. On each of your turns until the spell ends, you can use your action to target another creature. If you target a creature again after it has succeeded on a saving throw against this casting of Eyebite, the creature has advantage on its saving throws.

Asleep. The target falls unconscious. It wakes up if it takes any damage or if another creature uses its action to shake the sleeper awake.

Panicked. The target is frightened of you. On each of its turns, the frightened creature must take the Dash action and move away from you by the safest and shortest available route, unless there is nowhere to move. If the target moves to a place at least 90 feet away from you where it can no longer see you, this effect ends.

Sickened. The target has disadvantage on attack rolls and ability checks. At the end of each of its turns, it can make another Wisdom saving throw. If it succeeds, the effect ends. If it fails, it takes 2d8 points of necrotic damage.

When cast at higher levels: The distance needed for Panicked effect to end increases by 10 feet for each level above 6th. The damage done by Sickened effect increases by 1d8 for each level above 6th.

Notes: Changes to original are highlighted for the benefit of those who know the original spell, even though comparison to original is not what I’m asking. The duration is increased to give this spell more utility, and ability to last for several encounters. The range is increased to match Hold Monster. The damage is added to Sickened effect, so it wouldn’t be strictly inferior to Panicked, which also gives the same disadvantages with different and arguable much stronger condition to end the effect. Scaling with level is added to keep the spell competitive at higher character levels. The ability to target same creature again is given so the spell doesn’t become useless if all enemies succeed at their saving throw, but disadvantage is given so that in most situation it’d still be better to do something else than keep spamming Eyebite at disadvantage.

How to calculate the chances of reaching a certain success level prior to failed channeling?

In Warhammer 4e casters can use channeling in order to gain success level prior to casting a spell. Success levels are essentially for every 10 you exceed the skill number you gain a success level and they keep piling up till you make a failed roll.

As a wizard I am trying to figure out how to calculate the probability of piling up enough SL’s before failing channeling and suffering a miscast.

What I wish to ask if how can I calculate my odds of reaching a certain SL prior to suffering a miscast (Making a failed roll) and losing all of my SL? (Note that the system uses a d100 and you try to roll below your skill.)

What caster level do you need to craft a ring of protection +5

I had always assumed that there was a similar requirement to crearing higher tiers of rings of protection (and magic items in general), just like you need to be at least three times the enhancement bonus in caster level for magic weapon- and armor enhancement.

However a player pointed out that the rules do not say so and frankly I haven’t found anything contradicting in the DMG. Is it actually the case that you could theoretically forge a ring of protection +5 at caster level 5th given that you have a high enough level to get the approptiate feat – or am I missing something?

What is the best 2nd level spell to concentrate on to maximize damage?

In a party full of crowd control, the Magus wishes to dish out as much damage as possible. What concentration spell will allow them to do that, under the given circumstance:

  • The Magus is 4th level, any race, any class/multiclass, feats available
  • The damage is dealt out over 1 minute maximum
  • The rest of the party is focused on their own goals, so any preparation or buffs on the Magus will have to come from themselves: (no time limit)
  • Assume things go perfectly 100% of the time: ie enemies will always fail on saving throws, the Magus will always succeed on an attack roll, disregard advantage and disadvantage
  • The only source of damage tracked comes from the Magus’ concentration spell; no need to worry about ensuring their action is free every round to cast another damaging spell
  • Assume all damage is average: 1d6 = 3.5 damage, don’t round
  • If a spell can hit multiple targets, there are 2 available each round
  • These 2 enemies behave optimally for your damage: if an enemy must end its turn in the spells area to take its damage, then 2 enemies in a round will do so.

Is Additional Fighting Style underpowered as the only class feature at a given level?

This question is inspired by considering minor homebrew improvements to the Champion subclass, which is frequently but not universally considered a weak subclass.

Looking at the class features, the following occurred to me about Additional Fighting Style (level 10):

  1. Most fighting styles don’t synergize. The main exception is taking both a defensive and offensive fighting style, leading to common recommendations of Defense as the go-to choice for level 10 Champions.
  2. Every class that gets a first fighting style gets additional features at that level (e.g. Spellcasting for level 2 Paladins and Rangers).

So Additional Fighting Style by itself seems pretty weak compared to the level 10 features of other fighter subclasses. Hence the question.